mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
webpack: replace deprecated LoaderOptionsPlugin with OptimizeCSSAssetsPlugin
This commit is contained in:
@@ -2,6 +2,8 @@ const webpack = require('webpack');
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
const CompressionPlugin = require("compression-webpack-plugin");
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
|
||||
const cssnano = require("cssnano");
|
||||
|
||||
const {
|
||||
root
|
||||
@@ -18,12 +20,6 @@ module.exports = {
|
||||
}
|
||||
}),
|
||||
|
||||
// Loader options
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
minimize: true,
|
||||
debug: false
|
||||
}),
|
||||
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: 'disabled', // change it to `server` to view bundle stats
|
||||
reportFilename: 'report.html',
|
||||
@@ -64,6 +60,15 @@ module.exports = {
|
||||
},
|
||||
sourceMap: true
|
||||
}
|
||||
}),
|
||||
new OptimizeCSSAssetsPlugin({
|
||||
cssProcessor: cssnano,
|
||||
cssProcessorOptions: {
|
||||
discardComments: {
|
||||
removeAll: true,
|
||||
}
|
||||
},
|
||||
safe: true
|
||||
})
|
||||
]
|
||||
},
|
||||
|
@@ -241,18 +241,6 @@ module.exports = function (options) {
|
||||
'HMR': false,
|
||||
}
|
||||
}),
|
||||
|
||||
/**
|
||||
* Plugin LoaderOptionsPlugin (experimental)
|
||||
*
|
||||
* See: https://gist.github.com/sokra/27b24881210b56bbaff7
|
||||
*/
|
||||
new LoaderOptionsPlugin({
|
||||
debug: false,
|
||||
options: {
|
||||
|
||||
}
|
||||
}),
|
||||
new ForkTsCheckerWebpackPlugin()
|
||||
],
|
||||
|
||||
|
Reference in New Issue
Block a user