+ /*
+ * Plugin: HtmlWebpackPlugin
+ * Description: Simplifies creation of HTML files to serve your webpack bundles.
+ * This is especially useful for webpack bundles that include a hash in the filename
+ * which changes every compilation.
+ *
+ * See: https://github.com/ampedandwired/html-webpack-plugin
+ */
+ new HtmlWebpackPlugin({
+ template: 'src/index.html',
+ title: METADATA.title,
+ chunksSortMode: 'dependency',
+ metadata: METADATA,
+ inject: 'body'
+ }),
+
+ new WebpackNotifierPlugin({ alwaysNotify: true }),
+
+ /**
+ * Plugin LoaderOptionsPlugin (experimental)
+ *
+ * See: https://gist.github.com/sokra/27b24881210b56bbaff7
+ */
+ new LoaderOptionsPlugin({
+ options: {
+ sassLoader: {
+ precision: 10,
+ includePaths: [ helpers.root('src/sass') ]
+ }
+ }
+ }),
+
+ new ngcWebpack.NgcWebpackPlugin({
+ disabled: !AOT,
+ tsConfig: helpers.root('tsconfig.webpack.json'),
+ resourceOverride: helpers.root('config/resource-override.js')
+ }),
+
+ new BundleAnalyzerPlugin({
+ // Can be `server`, `static` or `disabled`.
+ // In `server` mode analyzer will start HTTP server to show bundle report.
+ // In `static` mode single HTML file with bundle report will be generated.
+ // In `disabled` mode you can use this plugin to just generate Webpack Stats JSON file by setting `generateStatsFile` to `true`.
+ analyzerMode: 'static',
+ // Path to bundle report file that will be generated in `static` mode.
+ // Relative to bundles output directory.
+ reportFilename: 'report.html',
+ // Automatically open report in default browser
+ openAnalyzer: false,
+ // If `true`, Webpack Stats JSON file will be generated in bundles output directory
+ generateStatsFile: true,
+ // Name of Webpack Stats JSON file that will be generated if `generateStatsFile` is `true`.
+ // Relative to bundles output directory.
+ statsFilename: 'stats.json',
+ // Options for `stats.toJson()` method.
+ // For example you can exclude sources of your modules from stats file with `source: false` option.
+ // See more options here: https://github.com/webpack/webpack/blob/webpack-1/lib/Stats.js#L21
+ statsOptions: null,
+ // Log level. Can be 'info', 'warn', 'error' or 'silent'.
+ logLevel: 'info'
+ })
+ ],