File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
const webpack = require ( 'webpack' )
2
2
const merge = require ( 'webpack-merge' )
3
3
const base = require ( './webpack.base.config' )
4
+ const glob = require ( 'glob' )
4
5
const SWPrecachePlugin = require ( 'sw-precache-webpack-plugin' )
5
6
const VueSSRClientPlugin = require ( 'vue-server-renderer/client-plugin' )
6
7
@@ -48,7 +49,12 @@ if (process.env.NODE_ENV === 'production') {
48
49
cacheId : 'vue-hn' ,
49
50
filename : 'service-worker.js' ,
50
51
dontCacheBustUrlsMatching : / ./ ,
51
- staticFileGlobsIgnorePatterns : [ / i n d e x \. h t m l $ / , / \. m a p $ / ]
52
+ staticFileGlobsIgnorePatterns : [ / i n d e x \. h t m l $ / , / \. m a p $ / ] ,
53
+ dynamicUrlToDependencies : {
54
+ '/top' : [
55
+ ...glob . sync ( './dist/*.js' )
56
+ ]
57
+ }
52
58
} )
53
59
)
54
60
}
Original file line number Diff line number Diff line change 37
37
"css-loader" : " ^0.28.0" ,
38
38
"file-loader" : " ^0.11.1" ,
39
39
"friendly-errors-webpack-plugin" : " ^1.6.1" ,
40
+ "glob" : " ^7.1.1" ,
40
41
"rimraf" : " ^2.6.1" ,
41
42
"stylus" : " ^0.54.5" ,
42
43
"stylus-loader" : " ^3.0.1" ,
You can’t perform that action at this time.
0 commit comments