To deploy my angular app on server, I run the following command: ng build --prod. But in the dist folder that I get, I don't have the index.html file. I wonder if it is a best practice to copy and paste the index.html file that I have or if there is something else that i am missing.
angular-cli.json
{
"project": {
"version": "1.0.0-beta.28.3",
"name": "main"
},
"apps": [
{
"root": "src",
"outDir": "../../target/frontend",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"files": "src/**/*.ts",
"project": "src/tsconfig.json"
},
{
"files": "e2e/**/*.ts",
"project": "e2e/tsconfig.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"prefixInterfaces": false,
"inline": {
"style": false,
"template": false
},
"spec": {
"class": false,
"component": true,
"directive": true,
"module": false,
"pipe": true,
"service": true
}
}
}
ng build --prodshould haveindex.html. check yourangular-cli.jsonand underappthere shoul beindexkeyangular-cli.jsonhere