From a0da507886e188492ed5419c002cf685feb05de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Wed, 29 Aug 2018 18:27:07 +0800 Subject: [PATCH] fix config lint error --- config/config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.js b/config/config.js index 0904a8f5..c796308c 100644 --- a/config/config.js +++ b/config/config.js @@ -1,4 +1,5 @@ // https://umijs.org/config/ +const os = require('os'); const pageRoutes = require('./router.config'); const webpackplugin = require('./plugin.config'); const defaultSetting = require('../src/defaultSetting'); @@ -20,7 +21,7 @@ export default { }, dynamicImport: true, polyfills: ['ie11'], - ...(!process.env.TEST && require('os').platform() === 'darwin' + ...(!process.env.TEST && os.platform() === 'darwin' ? { dll: ['dva', 'dva/router', 'dva/saga', 'dva/fetch'], hardSource: true, @@ -60,9 +61,8 @@ export default { .map(a => a.replace(/([A-Z])/g, '-$1')) .map(a => a.toLowerCase()); return `antd-pro${arr.join('-')}-${localName}`.replace(/--/g, '-'); - } else { - return localName; } + return localName; }, }, manifest: { -- GitLab