From b3d2d6d9be013cdc5a32c870698d062c59868cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?chencheng=20=28=E4=BA=91=E8=B0=A6=29?= Date: Fri, 11 Jan 2019 17:36:43 +0800 Subject: [PATCH] feat: enable tree-shaking (#3350) * feat: enable tree-shaking * bump umi's version to disable netlify's cache --- config/config.js | 2 ++ package.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/config.js b/config/config.js index a7b96905..55ccc0ba 100644 --- a/config/config.js +++ b/config/config.js @@ -20,6 +20,7 @@ const plugins = [ }, dynamicImport: { loadingComponent: './components/PageLoading/index', + webpackChunkName: true, }, pwa: { workboxPluginMode: 'InjectManifest', @@ -57,6 +58,7 @@ export default { define: { APP_TYPE: process.env.APP_TYPE || '', }, + treeShaking: true, targets: { ie: 11, }, diff --git a/package.json b/package.json index 24e87d06..c8ef2757 100644 --- a/package.json +++ b/package.json @@ -95,9 +95,9 @@ "tslint": "^5.10.0", "tslint-config-prettier": "^1.10.0", "tslint-react": "^3.6.0", - "umi": "^2.3.1", + "umi": "^2.3.5", "umi-plugin-ga": "^1.1.3", - "umi-plugin-react": "^1.2.0" + "umi-plugin-react": "^1.3.4" }, "optionalDependencies": { "puppeteer": "^1.10.0" -- GitLab