PatrickJS / NG6-starter

:ng: An AngularJS Starter repo for AngularJS + ES6 + Webpack
https://angularclass.github.io/NG6-starter
Apache License 2.0
1.91k stars 1.35k forks source link

Unable to add parameters or options to HtmlWebpackPlugin #234

Closed FarhadG closed 6 years ago

FarhadG commented 6 years ago

After trying nearly everything under the sun, I've opted (temporarily) to have two different index.html files as I was unable to have html-webpack-plugin to inject anything into the html file. For example, from their README, the ability to inject a title did not work:

  plugins: [
    new HtmlWebpackPlugin({
      title: 'My App',
      filename: 'assets/admin.html'
    })
  ]
FarhadG commented 6 years ago

In case anyone else runs into this issue. You need to essentially exclude index.html from the raw loader so that html-webpack-plugin can do what it needs to do.

https://github.com/jantimon/html-webpack-plugin/issues/747