project从角5版本迁移到了角6版本。因此,我没有像webpack.config这样的文件。现在它在CLI参与下工作。
迁移后会出现html webpack错误:

index.html实际上放置在D:\Projects\DP...\src\index.html上。
Q:如何使用cli更改index.html的“根”?我希望webpack在默认情况下寻找index.html in D:\Projects\DP...\src\index.html。
发布于 2018-11-20 13:09:43
您的问题似乎是,CLI为您的index.html文件提供了错误的路径。CLI配置在您的Angular.json文件中。在构建选项中,有一个字段可以找到您的index.html :您应该有这样的内容:
“建造”:{
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/saturn-app",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",希望这能帮到你!
https://stackoverflow.com/questions/53393466
复制相似问题