Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-monitor
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
Administrator
web-monitor
Commits
8e76fdb6
Unverified
Commit
8e76fdb6
authored
Jun 23, 2020
by
花裤衩
Committed by
GitHub
Jun 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: do not preload runtime.js (#596)
add runtime.js to fileBlacklist
parent
129ea7e6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
vue.config.js
vue.config.js
+10
-1
No files found.
vue.config.js
View file @
8e76fdb6
...
@@ -50,7 +50,15 @@ module.exports = {
...
@@ -50,7 +50,15 @@ module.exports = {
},
},
chainWebpack
(
config
)
{
chainWebpack
(
config
)
{
// it can improve the speed of the first screen, it is recommended to turn on preload
// it can improve the speed of the first screen, it is recommended to turn on preload
// config.plugins.delete('preload')
config
.
plugin
(
'preload'
).
tap
(()
=>
[
{
rel
:
'preload'
,
// to ignore runtime.js
// https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
fileBlacklist
:
[
/
\.
map$/
,
/hot-update
\.
js$/
,
/runtime
\.
.*
\.
js$/
],
include
:
'initial'
}
])
// when there are many pages, it will cause too many meaningless requests
// when there are many pages, it will cause too many meaningless requests
config
.
plugins
.
delete
(
'prefetch'
)
config
.
plugins
.
delete
(
'prefetch'
)
...
@@ -118,6 +126,7 @@ module.exports = {
...
@@ -118,6 +126,7 @@ module.exports = {
}
}
}
}
})
})
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
config
.
optimization
.
runtimeChunk
(
'single'
)
config
.
optimization
.
runtimeChunk
(
'single'
)
}
}
)
)
...
...
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