'About npm run build in Typescript+Vuejs

I built an app using typescript and vuejs. When I run the following command, it creates a 'dist' folder including index.html file. But when I open the index.html it is empty page.

npm run build

Before I run build command, I already run the 'serve' and 'dev' command, at that time the app runs successfully. so I thought app runs well. Then I tried to build the app but it created an empty html file.

Here is my package.json file:

"scripts": {        
        "lint": "eslint src",
        "build": "vue-cli-service build --dest dist/app src/app/main.ts",
        "serve": "vue-cli-service serve --open src/app/main.ts",
}

Why the build command fails?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source