Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
mongo-ui
Commits
f09990fa
Commit
f09990fa
authored
Aug 27, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 优化打包
parent
43a42c26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
8 deletions
+33
-8
vue.config.js
vue.config.js
+33
-8
No files found.
vue.config.js
View file @
f09990fa
...
@@ -62,6 +62,14 @@ module.exports = {
...
@@ -62,6 +62,14 @@ module.exports = {
config
.
optimization
.
splitChunks
({
config
.
optimization
.
splitChunks
({
chunks
:
"
all
"
,
chunks
:
"
all
"
,
cacheGroups
:
{
cacheGroups
:
{
pdfjs
:
{
name
:
"
chunk-pdfjs
"
,
// split cherryUI into a single package
priority
:
21
,
// the weight needs to be larger than libs and app or it will be packaged into libs or app
test
:
/
[\\/]
node_modules
[\\/]
pdfjs-dist
[\\/]
es5
[\\/]
/
,
// in order to adapt to cnpm
chunks
:
"
all
"
,
reuseExistingChunk
:
true
,
enforce
:
true
},
cherryUI
:
{
cherryUI
:
{
name
:
"
chunk-cherryUI
"
,
// split cherryUI into a single package
name
:
"
chunk-cherryUI
"
,
// split cherryUI into a single package
priority
:
20
,
// the weight needs to be larger than libs and app or it will be packaged into libs or app
priority
:
20
,
// the weight needs to be larger than libs and app or it will be packaged into libs or app
...
@@ -78,6 +86,14 @@ module.exports = {
...
@@ -78,6 +86,14 @@ module.exports = {
reuseExistingChunk
:
true
,
reuseExistingChunk
:
true
,
enforce
:
true
enforce
:
true
},
},
lodash
:
{
name
:
"
chunk-lodash
"
,
// split cherryUI into a single package
priority
:
18
,
// the weight needs to be larger than libs and app or it will be packaged into libs or app
test
:
/
[\\/]
node_modules
[\\/]
lodash
[\\/]
/
,
// in order to adapt to cnpm
chunks
:
"
initial
"
,
reuseExistingChunk
:
true
,
enforce
:
true
},
libs
:
{
libs
:
{
name
:
"
chunk-libs
"
,
name
:
"
chunk-libs
"
,
test
:
/
[\\/]
node_modules
[\\/]
/
,
test
:
/
[\\/]
node_modules
[\\/]
/
,
...
@@ -86,20 +102,29 @@ module.exports = {
...
@@ -86,20 +102,29 @@ module.exports = {
reuseExistingChunk
:
true
,
reuseExistingChunk
:
true
,
enforce
:
true
enforce
:
true
},
},
api
:
{
svg
:
{
name
:
"
chunk-
api
"
,
name
:
"
chunk-
svg
"
,
priority
:
9
,
priority
:
9
,
chunks
:
"
initial
"
,
test
:
resolve
(
"
src/assets/icons/svg
"
),
reuseExistingChunk
:
true
,
enforce
:
true
},
images
:
{
name
:
"
chunk-image
"
,
priority
:
8
,
chunks
:
"
all
"
,
chunks
:
"
all
"
,
minChunks
:
3
,
minChunks
:
3
,
test
:
resolve
(
"
src/a
pi
"
),
test
:
resolve
(
"
src/a
ssets/images
"
),
reuseExistingChunk
:
true
,
reuseExistingChunk
:
true
,
enforce
:
true
enforce
:
true
},
},
svg
:
{
api
:
{
name
:
"
chunk-svg
"
,
name
:
"
chunk-api
"
,
priority
:
8
,
priority
:
7
,
chunks
:
"
initial
"
,
chunks
:
"
all
"
,
test
:
resolve
(
"
src/assets/icons/svg
"
),
minChunks
:
3
,
test
:
resolve
(
"
src/api
"
),
reuseExistingChunk
:
true
,
reuseExistingChunk
:
true
,
enforce
:
true
enforce
:
true
},
},
...
...
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