0

project was migrated from angular 5 to angular 6 version. Thus, i have not such files as webpack.config. Now it works under CLI engage.

After migration there is html webpack error:

enter image description here

The index.html actually placed at D:\Projects\DP...\src\index.html.

Q: How can i change 'root' for index.html using cli ??? I would like webpack look for index.html in D:\Projects\DP...\src\index.html by default.

AllmanTool
  • 1,384
  • 1
  • 16
  • 26

1 Answers1

1

Your problem seems to be that the CLI has the wrong path for your index.html file. The CLI configuration is in your Angular.json file. There is a field that take the path to your index.html in build options: You should have something like that :

"build": {

      "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",

Hope this helped you!