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 11const webpack = require ( 'webpack' )
22const merge = require ( 'webpack-merge' )
33const base = require ( './webpack.base.config' )
4+ const glob = require ( 'glob' )
45const SWPrecachePlugin = require ( 'sw-precache-webpack-plugin' )
56const VueSSRClientPlugin = 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 : [ / 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+ }
5258 } )
5359 )
5460}
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments