From b0a3d7be7fd52ca290c5bbf207893da4b04c3010 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Mon, 22 Mar 2021 11:42:10 +0300 Subject: [PATCH] webpack updated to ver 5 --- vendor/framework7-react/build/webpack.config.js | 9 +++++---- vendor/framework7-react/package.json | 15 ++++++--------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/vendor/framework7-react/build/webpack.config.js b/vendor/framework7-react/build/webpack.config.js index 8d4fc4a43..ae3ee3a13 100644 --- a/vendor/framework7-react/build/webpack.config.js +++ b/vendor/framework7-react/build/webpack.config.js @@ -4,7 +4,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); -const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin'); +const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin'); const WorkboxPlugin = require('workbox-webpack-plugin'); @@ -53,6 +53,7 @@ module.exports = { minimizer: [new TerserPlugin({ sourceMap: true, })], + moduleIds: 'named', }, module: { rules: [ @@ -162,8 +163,8 @@ module.exports = { }), ...(env === 'production' ? [ - new OptimizeCSSPlugin({ - cssProcessorOptions: { + new CssMinimizerPlugin({ + processorOptions: { safe: true, map: { inline: false }, }, @@ -172,7 +173,7 @@ module.exports = { ] : [ // Development only plugins new webpack.HotModuleReplacementPlugin(), - new webpack.NamedModulesPlugin(), + // new webpack.NamedModulesPlugin(), ]), // new CleanWebpackPlugin(), new HtmlWebpackPlugin({ diff --git a/vendor/framework7-react/package.json b/vendor/framework7-react/package.json index a7e241a4d..4f10dcfef 100644 --- a/vendor/framework7-react/package.json +++ b/vendor/framework7-react/package.json @@ -53,27 +53,24 @@ "cpy-cli": "^3.1.1", "cross-env": "^7.0.3", "css-loader": "^4.3.0", + "css-minimizer-webpack-plugin": "^1.3.0", "file-loader": "^6.2.0", - "html-webpack-plugin": "^4.5.1", + "html-webpack-plugin": "^5.3.1", "less": "^3.13.1", "less-loader": "^6.2.0", - "mini-css-extract-plugin": "^0.9.0", + "mini-css-extract-plugin": "^1.3.9", "mobx": "^6.1.8", "mobx-react": "^7.1.0", - "optimize-css-assets-webpack-plugin": "^5.0.4", "ora": "^4.1.1", "postcss-loader": "^3.0.0", "postcss-preset-env": "^6.7.0", - "react-redux": "^7.2.2", - "redux": "^4.0.5", - "redux-thunk": "^2.3.0", "rimraf": "^3.0.2", "style-loader": "^1.3.0", "terser-webpack-plugin": "^3.1.0", "url-loader": "^4.1.1", - "webpack": "^4.46.0", - "webpack-cli": "^3.3.12", + "webpack": "^5.26.3", + "webpack-cli": "^4.5.0", "webpack-dev-server": "^3.11.2", - "workbox-webpack-plugin": "^5.1.4" + "workbox-webpack-plugin": "^6.1.2" } }