Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5aad15b

Browse files
StevenYuysyyyx990803
authored andcommitted
Lighthouse: respond with a 200 when offline (#175)
* respond with a 200 when offline* respond with a 200 when offline
1 parent8bcb633 commit5aad15b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

‎build/webpack.client.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
constwebpack=require('webpack')
22
constmerge=require('webpack-merge')
33
constbase=require('./webpack.base.config')
4+
constglob=require('glob')
45
constSWPrecachePlugin=require('sw-precache-webpack-plugin')
56
constVueSSRClientPlugin=require('vue-server-renderer/client-plugin')
67

@@ -48,7 +49,12 @@ if (process.env.NODE_ENV === 'production') {
4849
cacheId:'vue-hn',
4950
filename:'service-worker.js',
5051
dontCacheBustUrlsMatching:/./,
51-
staticFileGlobsIgnorePatterns:[/index\.html$/,/\.map$/]
52+
staticFileGlobsIgnorePatterns:[/index\.html$/,/\.map$/],
53+
dynamicUrlToDependencies:{
54+
'/top':[
55+
...glob.sync('./dist/*.js')
56+
]
57+
}
5258
})
5359
)
5460
}

‎package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"css-loader":"^0.28.0",
3838
"file-loader":"^0.11.1",
3939
"friendly-errors-webpack-plugin":"^1.6.1",
40+
"glob":"^7.1.1",
4041
"rimraf":"^2.6.1",
4142
"stylus":"^0.54.5",
4243
"stylus-loader":"^3.0.1",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp