Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
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
quantum-blocks
Commits
b7644030
Commit
b7644030
authored
Jan 20, 2021
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: 添加分包
parent
427123bd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
87 deletions
+87
-87
webpack.config.js
webpack.config.js
+87
-87
No files found.
webpack.config.js
View file @
b7644030
...
@@ -75,93 +75,93 @@ module.exports = {
...
@@ -75,93 +75,93 @@ module.exports = {
}
}
}
}
],
],
// optimization: {
optimization
:
{
// namedModules: true,
namedModules
:
true
,
// namedChunks: true,
namedChunks
:
true
,
// runtimeChunk: {
runtimeChunk
:
{
// name: 'runtime'
name
:
'
runtime
'
// },
},
// splitChunks:
splitChunks
:
// {
{
// name: false,
name
:
false
,
chunks
:
'
all
'
,
cacheGroups
:
{
default
:
false
,
saSdk
:
{
name
:
"
chunk-sa-sdk
"
,
// split cherryUI into a single package
priority
:
22
,
// the weight needs to be larger than libs and app or it will be packaged into libs or app
test
:
/
[\\/]
node_modules
[\\/]
sa-sdk-javascript
[\\/]
/
,
// in order to adapt to cnpm
enforce
:
true
},
// cherryUI: {
// name: 'chunk-cherryUI', // 分离组件库
// priority: 21,
// chunks: 'all',
// chunks: 'all',
// cacheGroups:
// test: /[\\/]node_modules[\\/]@qg[\\/]cherry-ui[\\/]/,
// {
// default: false,
// saSdk: {
// name: "chunk-sa-sdk", // split cherryUI into a single package
// priority: 22, // the weight needs to be larger than libs and app or it will be packaged into libs or app
// test: /[\\/]node_modules[\\/]sa-sdk-javascript[\\/]/, // in order to adapt to cnpm
// enforce: true
// enforce: true
// },
// },
// // cherryUI: {
lodash
:
{
// // name: 'chunk-cherryUI', // 分离组件库
name
:
'
chunk-lodash
'
,
// 分离组件库
// // priority: 21,
priority
:
19
,
// // chunks: 'all',
test
:
/
[\\/]
node_modules
[\\/]
lodash
[\\/]
/
,
// // test: /[\\/]node_modules[\\/]@qg[\\/]cherry-ui[\\/]/,
enforce
:
true
// // enforce: true
},
// // },
vue
:
{
// lodash: {
name
:
'
chunk-vue
'
,
// 分离组件库
// name: 'chunk-lodash', // 分离组件库
priority
:
17
,
// priority: 19,
test
:
/
[\\/]
node_modules
[\\/]
vue
[\\/]
/
,
// test: /[\\/]node_modules[\\/]lodash[\\/]/,
enforce
:
true
// enforce: true
},
// },
iview
:
{
// vue: {
name
:
'
chunk-iview
'
,
// 分离组件库
// name: 'chunk-vue', // 分离组件库
priority
:
16
,
// priority: 17,
test
:
/
[\\/]
node_modules
[\\/]
iview
[\\/]
/
,
// test: /[\\/]node_modules[\\/]vue[\\/]/,
enforce
:
true
// enforce: true
},
// },
lodash
:
{
// iview: {
name
:
'
chunk-lodash
'
,
// 分离组件库
// name: 'chunk-iview', // 分离组件库
priority
:
15
,
// priority: 16,
test
:
/
[\\/]
node_modules
[\\/]
lodash
[\\/]
/
,
// test: /[\\/]node_modules[\\/]iview[\\/]/,
enforce
:
true
// enforce: true
},
// },
ravenJs
:
{
// lodash: {
name
:
'
chunk-ravenJs
'
,
// 分离组件库
// name: 'chunk-lodash', // 分离组件库
priority
:
14
,
// priority: 15,
test
:
/
[\\/]
node_modules
[\\/]
raven-js
[\\/]
/
,
// test: /[\\/]node_modules[\\/]lodash[\\/]/,
enforce
:
true
// enforce: true
},
// },
common
:
{
// ravenJs: {
name
:
'
chunk-common
'
,
// name: 'chunk-ravenJs', // 分离组件库
minChunks
:
3
,
// priority: 14,
priority
:
3
,
// test: /[\\/]node_modules[\\/]raven-js[\\/]/,
reuseExistingChunk
:
true
,
// enforce: true
chunks
(
chunk
)
{
// },
return
[
'
login
'
,
'
editor
'
,
'
activity
'
].
includes
(
chunk
.
name
);
// common: {
},
// name:'chunk-common',
enforce
:
true
// minChunks: 3,
},
// priority: 3,
vendors
:
// reuseExistingChunk: true,
{
// chunks (chunk) {
name
:
'
common
'
,
// return ['login','editor','activity'].includes(chunk.name);
chunks
:
'
all
'
,
// },
minChunks
:
3
,
// enforce: true
priority
:
2
,
// },
test
:
/node_modules/
,
// vendors:
reuseExistingChunk
:
true
// {
},
// name: 'common',
styles
:
// chunks: 'all',
{
// minChunks: 3,
name
:
'
common
'
,
// priority: 2,
chunks
:
'
all
'
,
// test: /node_modules/,
minChunks
:
3
,
// reuseExistingChunk: true
priority
:
1
,
// },
test
:
/
\.(
css|less|scss|stylus
)
$/
,
// styles:
priority
:
50
,
// {
}
// name: 'common',
}
// chunks: 'all',
}
// minChunks: 3,
},
// priority: 1,
// test: /\.(css|less|scss|stylus)$/,
// priority: 50,
// }
// }
// }
// },
devtool
:
'
source-map
'
,
devtool
:
'
source-map
'
,
customize
(
webpackConfig
){
customize
(
webpackConfig
){
// 此外 webpackConfig 为原生生成的 webpack config,可以进行自定义处理
// 此外 webpackConfig 为原生生成的 webpack config,可以进行自定义处理
...
...
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