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
77357aee
Commit
77357aee
authored
Nov 15, 2018
by
ιεΈ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #2791, product environment removal plugin
parent
802930e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
config/plugin.config.js
config/plugin.config.js
+23
-20
No files found.
config/plugin.config.js
View file @
77357aee
...
...
@@ -5,26 +5,29 @@ import AntDesignThemePlugin from 'antd-theme-webpack-plugin';
import
path
from
'
path
'
;
export
default
config
=>
{
// ε°ζζ less εεΉΆδΈΊδΈδΈͺδΎ themePluginδ½Ώη¨
const
outFile
=
path
.
join
(
__dirname
,
'
../.temp/ant-design-pro.less
'
);
const
stylesDir
=
path
.
join
(
__dirname
,
'
../src/
'
);
// pro ε εΌεη―ε’εζ·»ε θΏδΈͺζδ»Ά
if
(
process
.
env
.
APP_TYPE
===
'
site
'
||
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
// ε°ζζ less εεΉΆδΈΊδΈδΈͺδΎ themePluginδ½Ώη¨
const
outFile
=
path
.
join
(
__dirname
,
'
../.temp/ant-design-pro.less
'
);
const
stylesDir
=
path
.
join
(
__dirname
,
'
../src/
'
);
config
.
plugin
(
'
merge-less
'
).
use
(
MergeLessPlugin
,
[
{
stylesDir
,
outFile
,
},
]);
config
.
plugin
(
'
merge-less
'
).
use
(
MergeLessPlugin
,
[
{
stylesDir
,
outFile
,
},
]);
config
.
plugin
(
'
ant-design-theme
'
).
use
(
AntDesignThemePlugin
,
[
{
antDir
:
path
.
join
(
__dirname
,
'
../node_modules/antd
'
),
stylesDir
,
varFile
:
path
.
join
(
__dirname
,
'
../node_modules/antd/lib/style/themes/default.less
'
),
mainLessFile
:
outFile
,
// themeVariables: ['@primary-color'],
indexFileName
:
'
index.html
'
,
generateOne
:
true
,
lessUrl
:
'
https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js
'
,
},
]);
config
.
plugin
(
'
ant-design-theme
'
).
use
(
AntDesignThemePlugin
,
[
{
antDir
:
path
.
join
(
__dirname
,
'
../node_modules/antd
'
),
stylesDir
,
varFile
:
path
.
join
(
__dirname
,
'
../node_modules/antd/lib/style/themes/default.less
'
),
mainLessFile
:
outFile
,
// themeVariables: ['@primary-color'],
indexFileName
:
'
index.html
'
,
generateOne
:
true
,
lessUrl
:
'
https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js
'
,
},
]);
}
};
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