From 166a989a79c0173673f75125a1834e74e6281554 Mon Sep 17 00:00:00 2001 From: abhijithvijayan <34790378+abhijithvijayan@users.noreply.github.com> Date: Sun, 15 Nov 2020 16:30:26 +0530 Subject: [PATCH] fix: webpack loaders and plugins api breaking changes --- webpack.config.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 37ad766..2771046 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -110,9 +110,16 @@ module.exports = { { loader: 'postcss-loader', options: { - ident: 'postcss', - // eslint-disable-next-line global-require - plugins: [require('autoprefixer')()], + postcssOptions: { + plugins: [ + [ + 'autoprefixer', + { + // Options + }, + ], + ], + }, }, }, 'resolve-url-loader', @@ -156,17 +163,21 @@ module.exports = { chunks: ['popup'], filename: 'popup.html', }), - new CopyWebpackPlugin([{from: 'source/assets', to: 'assets'}]), + // copy static assets + new CopyWebpackPlugin({ + patterns: [{from: 'source/assets', to: 'assets'}], + }), + // plugin to enable browser reloading in development mode extensionReloaderPlugin, ], optimization: { + minimize: true, minimizer: [ new TerserPlugin({ - cache: true, parallel: true, terserOptions: { - output: { + format: { comments: false, }, },