From f6801fc176bbb017f83777ae6493d3c4dbb897e6 Mon Sep 17 00:00:00 2001 From: boyongjiong Date: Mon, 19 Aug 2024 19:32:01 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=B1=8F=E8=94=BD=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=89=93=E5=8C=85=E6=97=B6=20anaylysis=20=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=A7=BB=E9=99=A4=20console=20?= =?UTF-8?q?=E7=9A=84=E9=80=89=E9=A1=B9=EF=BC=8C=E7=A7=BB=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 3 --- rollup.config.js | 5 ++++- sites/docs/.dumirc.ts | 23 ++++++++++++----------- sites/docs/package.json | 2 -- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 85fe4cc40f..69a9907dea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -735,9 +735,6 @@ importers: specifier: '>=16.8' version: 18.3.1(react@18.2.0) devDependencies: - '@babel/plugin-transform-runtime': - specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.25.2) '@types/react': specifier: ^18.2.17 version: 18.3.3 diff --git a/rollup.config.js b/rollup.config.js index bbd34aa32d..89feed5e20 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -92,7 +92,10 @@ export function rollupConfig(config = {}) { ], }), nodePolyfills(), - terser({ sourceMap: true }), + terser({ + sourceMap: true, + drop_console: true, + }), fileSize({ reporter: [ async (options, bundle, result) => { diff --git a/sites/docs/.dumirc.ts b/sites/docs/.dumirc.ts index 088d668855..5fdba32596 100644 --- a/sites/docs/.dumirc.ts +++ b/sites/docs/.dumirc.ts @@ -433,14 +433,15 @@ export default defineConfig({ }, '@ant-design/icons', ], - // [ - // 'import', - // { - // libraryName: 'lodash-es', - // libraryDirectory: '', - // camel2DashComponentName: false - // }, 'lodash-es' - // ] + [ + 'import', + { + libraryName: 'lodash-es', + libraryDirectory: '', + camel2DashComponentName: false, + }, + 'lodash-es', + ], ], codeSplitting: { jsStrategy: 'granularChunks' }, chainWebpack: (config) => { @@ -456,9 +457,9 @@ export default defineConfig({ ]); // 打开 bundle 分析器 - config - .plugin('webpack-bundle-analyzer') - .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin); + // config + // .plugin('webpack-bundle-analyzer') + // .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin); } return config; diff --git a/sites/docs/package.json b/sites/docs/package.json index e395b9ba74..139c4c2bc0 100644 --- a/sites/docs/package.json +++ b/sites/docs/package.json @@ -17,7 +17,6 @@ "react-dom": ">=16.8" }, "devDependencies": { - "@babel/plugin-transform-runtime": "^7.24.7", "@types/react": "^18.2.17", "@types/react-copy-to-clipboard": "^5.0.4", "@types/react-dom": "^18.3.0", @@ -30,7 +29,6 @@ }, "dependencies": { "@ant-design/icons": "^5.0.1", - "@babel/runtime": "^7.25.0", "@logicflow/core": "workspace:*", "@logicflow/dumi-theme-simple": "^0.0.19", "@logicflow/extension": "workspace:*",