Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
dd59a08b
Commit
dd59a08b
authored
May 18, 2019
by
陈帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix code lint error
parent
80ce8fe4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
.eslintrc.js
.eslintrc.js
+1
-0
config/config.ts
config/config.ts
+20
-14
No files found.
.eslintrc.js
View file @
dd59a08b
...
...
@@ -11,6 +11,7 @@ module.exports = {
},
globals
:
{
page
:
true
,
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION
:
true
,
},
rules
:
{
'
react/jsx-filename-extension
'
:
[
1
,
{
extensions
:
[
'
.js
'
]
}],
...
...
config/config.ts
View file @
dd59a08b
...
...
@@ -6,7 +6,8 @@ import defaultSettings from './defaultSettings';
import
webpackPlugin
from
'
./plugin.config
'
;
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
plugins
:
IPlugin
[]
=
[
...
...
@@ -18,9 +19,12 @@ const plugins: IPlugin[] = [
hmr
:
true
,
},
locale
:
{
enable
:
true
,
// default false
default
:
'
zh-CN
'
,
// default zh-CN
baseNavigator
:
true
,
// default true, when it is true, will use `navigator.language` overwrite default
// default false
enable
:
true
,
// default zh-CN
default
:
'
zh-CN
'
,
// default true, when it is true, will use `navigator.language` overwrite default
baseNavigator
:
true
,
},
dynamicImport
:
{
loadingComponent
:
'
./components/PageLoading/index
'
,
...
...
@@ -67,17 +71,19 @@ if (ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site') {
},
]);
}
const
uglifyJSOptions
=
NODE_ENV
===
'
production
'
?
{
uglifyOptions
:
{
// remove console.* except console.error
compress
:
{
drop_console
:
true
,
pure_funcs
:
[
'
console.error
'
],
const
uglifyJSOptions
=
NODE_ENV
===
'
production
'
?
{
uglifyOptions
:
{
// remove console.* except console.error
compress
:
{
drop_console
:
true
,
pure_funcs
:
[
'
console.error
'
],
},
},
},
}
:
{};
}
:
{};
export
default
{
// add for transfer to umi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment