From 064843171b05e081919f89c26a839738e400e163 Mon Sep 17 00:00:00 2001 From: yokots Date: Thu, 30 Nov 2023 15:48:40 +0800 Subject: [PATCH] build(example-scripts): remove webpack.NamedModulesPlugin webpack.NamedModulesPlugin was deprecated in v4 and removed in v5. these plugin are default in devlopment mode and should not be configured in production mode, because it will expose file path and increase bundle sizes. https://v4.webpack.js.org/migrate/4/#deprecatedremoved-plugins --- .../hippy-react-demo/scripts/hippy-webpack.android-vendor.js | 1 - .../examples/hippy-react-demo/scripts/hippy-webpack.android.js | 1 - .../hippy-react-demo/scripts/hippy-webpack.ios-vendor.js | 1 - driver/js/examples/hippy-react-demo/scripts/hippy-webpack.ios.js | 1 - .../hippy-react-demo/scripts/hippy-webpack.web-renderer.dev.js | 1 - .../hippy-react-demo/scripts/hippy-webpack.web-renderer.js | 1 - .../examples/hippy-react-demo/scripts/hippy-webpack.web.dev.js | 1 - driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web.js | 1 - .../hippy-vue-demo/scripts/hippy-webpack.android-vendor.js | 1 - .../js/examples/hippy-vue-demo/scripts/hippy-webpack.android.js | 1 - .../examples/hippy-vue-demo/scripts/hippy-webpack.ios-vendor.js | 1 - driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios.js | 1 - .../hippy-vue-next-demo/scripts/hippy-webpack.android-vendor.js | 1 - .../hippy-vue-next-demo/scripts/hippy-webpack.android.js | 1 - .../hippy-vue-next-demo/scripts/hippy-webpack.ios-vendor.js | 1 - .../js/examples/hippy-vue-next-demo/scripts/hippy-webpack.ios.js | 1 - .../scripts/webpack-ssr-config/client.android.vendor.js | 1 - .../scripts/webpack-ssr-config/client.base.js | 1 - .../scripts/webpack-ssr-config/client.dev.js | 1 - .../scripts/webpack-ssr-config/client.ios.vendor.js | 1 - 20 files changed, 20 deletions(-) diff --git a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.android-vendor.js b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.android-vendor.js index 4dcfe8c83bf..3352ea03d3d 100644 --- a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.android-vendor.js +++ b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.android-vendor.js @@ -18,7 +18,6 @@ module.exports = { library: 'hippyReactBase', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.android.js b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.android.js index 20a4e1556a4..0ec17eea641 100644 --- a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.android.js +++ b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.android.js @@ -22,7 +22,6 @@ module.exports = { // publicPath: 'https://xxx/hippy/hippyReactDemo/', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.ios-vendor.js b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.ios-vendor.js index 2d6134ae4d7..d452d0bd22b 100644 --- a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.ios-vendor.js +++ b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.ios-vendor.js @@ -18,7 +18,6 @@ module.exports = { library: 'hippyReactBase', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.ios.js b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.ios.js index ec799757cb5..481cbc5ab0a 100644 --- a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.ios.js +++ b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.ios.js @@ -22,7 +22,6 @@ module.exports = { // publicPath: 'https://xxx/hippy/hippyReactDemo/', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.dev.js b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.dev.js index f4dfeff0fb0..cad64bb713b 100644 --- a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.dev.js +++ b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.dev.js @@ -29,7 +29,6 @@ module.exports = { globalObject: '(0, eval)("this")', }, plugins: [ - new webpack.NamedModulesPlugin(), new HtmlWebpackPlugin({ inject: true, scriptLoading: 'blocking', diff --git a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.js b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.js index d15bec933fd..376365e717a 100644 --- a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.js +++ b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.js @@ -17,7 +17,6 @@ module.exports = { path: path.resolve(`./dist/${platform}/`), }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web.dev.js b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web.dev.js index b3a6c539f7c..29938d273bd 100644 --- a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web.dev.js +++ b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web.dev.js @@ -25,7 +25,6 @@ module.exports = { path: path.resolve(`./dist/${platform}/`), }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('development'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web.js b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web.js index 8a055cb4401..aa661369fc1 100644 --- a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web.js +++ b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web.js @@ -18,7 +18,6 @@ module.exports = { path: path.resolve(`./dist/${platform}/`), }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.android-vendor.js b/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.android-vendor.js index 7bd76b3a139..dd0a29d751d 100644 --- a/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.android-vendor.js +++ b/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.android-vendor.js @@ -31,7 +31,6 @@ module.exports = { library: 'hippyVueBase', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.android.js b/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.android.js index b7a42a1c073..ae08ea81ea0 100644 --- a/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.android.js +++ b/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.android.js @@ -43,7 +43,6 @@ module.exports = { // publicPath: 'https://xxx/hippy/hippyVueDemo/', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios-vendor.js b/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios-vendor.js index 9d04455b698..78b5ef6d2af 100644 --- a/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios-vendor.js +++ b/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios-vendor.js @@ -31,7 +31,6 @@ module.exports = { library: 'hippyVueBase', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios.js b/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios.js index f16be6650ca..891d9564a66 100644 --- a/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios.js +++ b/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios.js @@ -43,7 +43,6 @@ module.exports = { // publicPath: 'https://xxx/hippy/hippyVueDemo/', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.android-vendor.js b/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.android-vendor.js index a8689aece99..9c6a2163ff7 100644 --- a/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.android-vendor.js +++ b/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.android-vendor.js @@ -19,7 +19,6 @@ module.exports = { library: 'hippyVueBase', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.android.js b/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.android.js index c6188b5a3ca..3fc2de49fc3 100644 --- a/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.android.js +++ b/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.android.js @@ -31,7 +31,6 @@ module.exports = { // publicPath: 'https://xxx/hippy/hippyVueNextDemo/', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.ios-vendor.js b/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.ios-vendor.js index a23657ec9fb..fdaa19a76ad 100644 --- a/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.ios-vendor.js +++ b/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.ios-vendor.js @@ -19,7 +19,6 @@ module.exports = { library: 'hippyVueBase', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.ios.js b/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.ios.js index a8154d41539..c8fed863d6c 100644 --- a/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.ios.js +++ b/driver/js/examples/hippy-vue-next-demo/scripts/hippy-webpack.ios.js @@ -31,7 +31,6 @@ module.exports = { // publicPath: 'https://xxx/hippy/hippyVueNextDemo/', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.android.vendor.js b/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.android.vendor.js index 85e8b860784..a3d1b8c5b97 100644 --- a/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.android.vendor.js +++ b/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.android.vendor.js @@ -19,7 +19,6 @@ module.exports = { library: 'hippyVueBase', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform), diff --git a/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.base.js b/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.base.js index 36b6537e19d..f8f9fd519ee 100644 --- a/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.base.js +++ b/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.base.js @@ -41,7 +41,6 @@ exports.getWebpackSsrBaseConfig = function (platform, env) { // publicPath: 'https://xxx/hippy/hippyVueNextDemo/', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify(env), diff --git a/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.dev.js b/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.dev.js index f465c4ff488..762b78ce043 100644 --- a/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.dev.js +++ b/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.dev.js @@ -63,7 +63,6 @@ module.exports = { globalObject: '(0, eval)("this")', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify('development'), diff --git a/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.ios.vendor.js b/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.ios.vendor.js index 6783d5a86ba..140d016aad2 100644 --- a/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.ios.vendor.js +++ b/driver/js/examples/hippy-vue-next-ssr-demo/scripts/webpack-ssr-config/client.ios.vendor.js @@ -19,7 +19,6 @@ module.exports = { library: 'hippyVueBase', }, plugins: [ - new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production'), __PLATFORM__: JSON.stringify(platform),