diff --git a/config/config.js b/config/config.js index fbe7b2ce6afb2e27a3b9850ee0bb32d36d69ab61..43434e1077433ea5508efa20ad0ed67b7655e6b2 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 401bfd5333a80d63ceb0cf328b7d03e746fc8713..984971d11605f6e1d6dc5c6c551e54d0920df2c1 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",