From bfa9a32fb1322779c4d007cc3d6cd7270245fc89 Mon Sep 17 00:00:00 2001 From: sorrycc Date: Tue, 14 Aug 2018 11:38:47 +0800 Subject: [PATCH] Only enable hardSource and dll for mac --- config/config.js | 9 ++++++++- package.json | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config/config.js b/config/config.js index fbe7b2ce..43434e10 100644 --- a/config/config.js +++ b/config/config.js @@ -20,7 +20,14 @@ export default { default: 'zh-CN', // default zh-CN baseNavigator: true, // default true, when it is true, will use `navigator.language` overwrite default }, - dll: ['dva', 'dva/router', 'dva/saga', 'dva/fetch'], + ...( + require('os').platform() === 'darwin' + ? { + dll: ['dva', 'dva/router', 'dva/saga', 'dva/fetch'], + hardSource: true, + } + : {} + ), }, ], ], diff --git a/package.json b/package.json index 401bfd53..984971d1 100755 --- a/package.json +++ b/package.json @@ -6,9 +6,9 @@ "scripts": { "precommit": "npm run lint-staged", "presite": "npm run generate-mock && cd functions && npm install", - "start": "cross-env umi dev", + "start": "umi dev", "start:no-mock": "cross-env MOCK=none umi dev", - "build": "cross-env umi build", + "build": "umi build", "site": "npm run presite && npm run build && firebase deploy", "analyze": "cross-env ANALYZE=1 umi build", "lint:style": "stylelint \"src/**/*.less\" --syntax less", -- GitLab