const {GlobCopyWebpackPlugin, BaseHrefWebpackPlugin} = require('@angular/cli/plugins/webpack');
const {CommonsChunkPlugin} = require('webpack').optimize;
const {AotPlugin} = require('@ngtools/webpack');
-
+var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const nodeModules = path.join(process.cwd(), 'node_modules');
const bundledScripts = [
enforce: "pre",
test: /\.js$/,
loader: "source-map-loader",
- exclude: [ /\/node_modules\// ]
+ exclude: [ path.join(__dirname, 'node_modules') ]
},
{ test: /\.json$/, loader: "json-loader" },
{ test: /\.html$/, loader: "html-loader" },
}),
new webpack.NoEmitOnErrorsPlugin(),
new ProgressPlugin(),
+ // new BundleAnalyzerPlugin(),
// new HtmlWebpackPlugin({
// template: "./src/index.html",
// filename: "./index.html",
// }),
new GlobCopyWebpackPlugin({
patterns: [
+ "assets/preloading.css",
"assets/languages",
"assets/styles/fonts",
"assets/styles/images",
}),
new AotPlugin({
mainPath: "main.ts",
- exclude: [],
+ exclude: [ "**/*.spec.ts" ],
tsConfigPath: "src/tsconfig.json",
skipCodeGeneration: true
})