diff --git a/package.json b/package.json index ac76033..238744a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "scripts": { "start": "antd-tools run clean && cross-env NODE_ENV=development NODE_OPTIONS=--openssl-legacy-provider concurrently \"bisheng start -c ./site/bisheng.config.js\"", "clean": "antd-tools run clean && rm -rf es lib coverage dist report.html", - "compile": "npm run clean && antd-tools run compile && antd-tools run dist", + "compile": "npm run clean && antd-tools run compile && cross-env NODE_OPTIONS=--openssl-legacy-provider antd-tools run dist", "dist": "antd-tools run dist", "prepublishOnlyNot": "npm run compile", "site": "rimraf _site && cross-env NODE_OPTIONS=--max_old_space_size=4096 NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=production OUTPUT=_website bisheng build --ssr -c ./site/bisheng.config.js", diff --git a/webpack.config.js b/webpack.config.js index 3d030f6..21c1caa 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -146,15 +146,15 @@ if (process.env.RUN_ENV === 'PRODUCTION') { }); } - // if (process.env.NODE_ENV === 'development') { - // config.plugins.push( - // new BundleAnalyzerPlugin({ - // analyzerMode: 'static', - // openAnalyzer: false, - // reportFilename: '../report.html', - // }), - // ); - // } + if (!process.env.CI) { + config.plugins.push( + new BundleAnalyzerPlugin({ + analyzerMode: 'static', + openAnalyzer: false, + reportFilename: '../report.html', + }), + ); + } if (!process.env.NO_DUP_CHECK) { config.plugins.push(