Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
schbrain-archetype-initializer
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
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
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
tools
schbrain-archetype-initializer
Commits
0a81fa1e
Commit
0a81fa1e
authored
Mar 20, 2022
by
zhangdd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore:config compression
Signed-off-by:
zhangdd
<
86431843@qq.com
>
parent
b009735e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
initializer-ui/package.json
initializer-ui/package.json
+3
-2
initializer-ui/vue.config.js
initializer-ui/vue.config.js
+13
-2
No files found.
initializer-ui/package.json
View file @
0a81fa1e
...
...
@@ -18,7 +18,8 @@
"devDependencies"
:
{
"@babel/core"
:
"^7.17.8"
,
"@vue/cli-plugin-babel"
:
"~5.0.3"
,
"@vue/cli-service"
:
"^5.0.3"
"@vue/cli-service"
:
"^5.0.3"
,
"compression-webpack-plugin"
:
"^9.2.0"
},
"browserslist"
:
[
"> 1%"
,
...
...
@@ -26,4 +27,4 @@
"not dead"
,
"not ie 11"
]
}
\ No newline at end of file
}
initializer-ui/vue.config.js
View file @
0a81fa1e
const
{
defineConfig
}
=
require
(
'
@vue/cli-service
'
)
const
{
defineConfig
}
=
require
(
'
@vue/cli-service
'
)
const
CompressionPlugin
=
require
(
"
compression-webpack-plugin
"
)
module
.
exports
=
defineConfig
({
transpileDependencies
:
true
transpileDependencies
:
true
,
chainWebpack
:
(
config
)
=>
{
config
.
plugin
(
'
compressionPlugin
'
)
.
use
(
new
CompressionPlugin
({
test
:
/
\.
js$|
\.
html$|
\.
css/
,
// 匹配文件名
threshold
:
10240
,
// 对超过10k的数据压缩
deleteOriginalAssets
:
false
// 不删除源文件
}))
}
})
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