Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
linweijiong
jinfa-platform
Commits
152cb2fb
Commit
152cb2fb
authored
Nov 30, 2021
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 生产环境不分割代码
parent
39ed1795
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
39 deletions
+39
-39
config.prod.ts
config/config.prod.ts
+39
-39
No files found.
config/config.prod.ts
View file @
152cb2fb
...
...
@@ -30,45 +30,45 @@ export default defineConfig({
chainWebpack
(
config
)
{
config
.
plugin
(
'antd-dayjs-webpack-plugin'
).
use
(
AntdDayjsWebpackPlugin
)
config
.
plugin
(
'lodash-webpack-plugin'
).
use
(
LodashModuleReplacementPlugin
)
config
.
merge
({
optimization
:
{
minimize
:
true
,
splitChunks
:
{
chunks
:
'all'
,
minSize
:
1024
*
30
,
minChunks
:
2
,
automaticNameDelimiter
:
'.'
,
cacheGroups
:
{
vendor
:
{
name
:
'vendors'
,
test
({
resource
})
{
return
/
[\\/]
node_modules
[\\/]
/
.
test
(
resource
);
},
priority
:
-
10
,
},
services
:
{
name
:
'services'
,
test
({
resource
})
{
return
/
[\\/]
services
[\\/]
/
.
test
(
resource
)
},
},
"lingxi-disign"
:
{
name
:
'@lingxi-design'
,
test
({
resource
})
{
return
/
[\\/]
@lingxi-design
[\\/]
/
.
test
(
resource
)
},
priority
:
30
,
},
styles
:
{
name
:
'styles'
,
test
:
/
\.(
le|c
)
ss$/
,
chunks
:
'all'
,
enforce
:
true
,
}
},
},
},
});
//
config.merge({
//
optimization: {
//
minimize: true,
//
splitChunks: {
//
chunks: 'all',
//
minSize: 1024 * 30,
//
minChunks: 2,
//
automaticNameDelimiter: '.',
//
cacheGroups: {
//
vendor: {
//
name: 'vendors',
//
test({ resource }) {
//
return /[\\/]node_modules[\\/]/.test(resource);
//
},
//
priority: -10,
//
},
//
services: {
//
name: 'services',
//
test({ resource }) {
//
return /[\\/]services[\\/]/.test(resource)
//
},
//
},
//
"lingxi-disign": {
//
name: '@lingxi-design',
//
test({ resource }) {
//
return /[\\/]@lingxi-design[\\/]/.test(resource)
//
},
//
priority: 30,
//
},
//
styles: {
//
name: 'styles',
//
test: /\.(le|c)ss$/,
//
chunks: 'all',
//
enforce: true,
//
}
//
},
//
},
//
},
//
});
config
.
module
.
rule
(
'svg'
)
.
exclude
.
add
(
/pages/
)
...
...
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