Escape '<' char before jsoup validation
[sdc.git] / catalog-ui / webpack.common.js
index fc2f5a4..5b745c9 100644 (file)
@@ -9,7 +9,7 @@ const postcssUrl = require('postcss-url');
 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 = [
@@ -80,7 +80,7 @@ module.exports = function(params) {
                     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" },
@@ -196,6 +196,7 @@ module.exports = function(params) {
             }),
             new webpack.NoEmitOnErrorsPlugin(),
             new ProgressPlugin(),
+            // new BundleAnalyzerPlugin(),
             // new HtmlWebpackPlugin({
             //     template: "./src/index.html",
             //     filename: "./index.html",
@@ -225,6 +226,7 @@ module.exports = function(params) {
             // }),
             new GlobCopyWebpackPlugin({
                 patterns: [
+                    "assets/preloading.css",
                     "assets/languages",
                     "assets/styles/fonts",
                     "assets/styles/images",
@@ -291,7 +293,7 @@ module.exports = function(params) {
             }),
             new AotPlugin({
                 mainPath: "main.ts",
-                exclude: [],
+                exclude: [    "**/*.spec.ts" ],
                 tsConfigPath: "src/tsconfig.json",
                 skipCodeGeneration: true
             })