Commit dd59a08b authored by 陈帅's avatar 陈帅

fix code lint error

parent 80ce8fe4
...@@ -11,6 +11,7 @@ module.exports = { ...@@ -11,6 +11,7 @@ module.exports = {
}, },
globals: { globals: {
page: true, page: true,
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
}, },
rules: { rules: {
'react/jsx-filename-extension': [1, { extensions: ['.js'] }], 'react/jsx-filename-extension': [1, { extensions: ['.js'] }],
......
...@@ -6,7 +6,8 @@ import defaultSettings from './defaultSettings'; ...@@ -6,7 +6,8 @@ import defaultSettings from './defaultSettings';
import webpackPlugin from './plugin.config'; import webpackPlugin from './plugin.config';
const { pwa, primaryColor } = defaultSettings; const { pwa, primaryColor } = defaultSettings;
// preview.pro.ant.design only do not use in your production ; preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。 // preview.pro.ant.design only do not use in your production ;
// preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
const { ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION, TEST, NODE_ENV } = process.env; const { ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION, TEST, NODE_ENV } = process.env;
const plugins: IPlugin[] = [ const plugins: IPlugin[] = [
...@@ -18,9 +19,12 @@ const plugins: IPlugin[] = [ ...@@ -18,9 +19,12 @@ const plugins: IPlugin[] = [
hmr: true, hmr: true,
}, },
locale: { locale: {
enable: true, // default false // default false
default: 'zh-CN', // default zh-CN enable: true,
baseNavigator: true, // default true, when it is true, will use `navigator.language` overwrite default // default zh-CN
default: 'zh-CN',
// default true, when it is true, will use `navigator.language` overwrite default
baseNavigator: true,
}, },
dynamicImport: { dynamicImport: {
loadingComponent: './components/PageLoading/index', loadingComponent: './components/PageLoading/index',
...@@ -67,13 +71,15 @@ if (ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site') { ...@@ -67,13 +71,15 @@ if (ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site') {
}, },
]); ]);
} }
const uglifyJSOptions = NODE_ENV === 'production'
const uglifyJSOptions =
NODE_ENV === 'production'
? { ? {
uglifyOptions: { uglifyOptions: {
// remove console.* except console.error // remove console.* except console.error
compress: { compress: {
drop_console: true, drop_console: true,
pure_funcs: [ 'console.error' ], pure_funcs: ['console.error'],
}, },
}, },
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment