upgrade to angular6

This commit is contained in:
lotte
2018-08-24 13:26:43 +02:00
parent 9fbbf53661
commit 2cbe6a6d91
180 changed files with 2987 additions and 2450 deletions

View File

@@ -6,6 +6,7 @@ const {
} = require('./helpers');
module.exports = {
mode: 'development',
devtool: 'source-map',
resolve: {
extensions: ['.ts', '.js', '.json']

View File

@@ -1,60 +1,68 @@
const webpack = require('webpack');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const CompressionPlugin = require("compression-webpack-plugin");
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const {
root
root
} = require('./helpers');
module.exports = {
recordsOutputPath: root('webpack.records.json'),
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
'process.env.AOT': true
}),
mode: 'production',
recordsOutputPath: root('webpack.records.json'),
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
'process.env.AOT': true
}),
// Loader options
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
}),
// Loader options
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
}),
new BundleAnalyzerPlugin({
analyzerMode: 'disabled', // change it to `server` to view bundle stats
reportFilename: 'report.html',
generateStatsFile: true,
statsFilename: 'stats.json',
}),
new BundleAnalyzerPlugin({
analyzerMode: 'disabled', // change it to `server` to view bundle stats
reportFilename: 'report.html',
generateStatsFile: true,
statsFilename: 'stats.json',
}),
new webpack.optimize.UglifyJsPlugin({
beautify: false,
mangle: false,
output: {
comments: false
},
compress: {
warnings: false,
conditionals: false,
unused: true,
comparisons: true,
sequences: true,
dead_code: true,
evaluate: true,
if_return: true,
join_vars: true,
negate_iife: true
},
sourceMap: true
}),
new CompressionPlugin({
asset: "[path].gz[query]",
algorithm: "gzip",
test: /\.js$|\.css$|\.html$/,
threshold: 10240,
minRatio: 0.8
})
new CompressionPlugin({
asset: "[path].gz[query]",
algorithm: "gzip",
test: /\.js$|\.css$|\.html$/,
threshold: 10240,
minRatio: 0.8
})
]
],
optimization: {
minimize: [
new UglifyJsPlugin({
uglifyOptions: {
beautify: false,
mangle: false,
output: {
comments: false
},
compress: {
warnings: false,
conditionals: false,
unused: true,
comparisons: true,
sequences: true,
dead_code: true,
evaluate: true,
if_return: true,
join_vars: true,
negate_iife: true
},
sourceMap: true
}
})
]
},
};