0
0
Fork 0

Cache media (#6902)

This commit is contained in:
Akihiko Odaki 2018-03-27 19:32:30 +09:00 committed by Eugen Rochko
parent 31e7b73084
commit ca42f9b0eb
10 changed files with 189 additions and 103 deletions

View file

@ -90,7 +90,7 @@ module.exports = merge(sharedConfig, {
'**/*.woff',
],
ServiceWorker: {
entry: path.join(__dirname, '../../app/javascript/mastodon/service_worker/entry.js'),
entry: `imports-loader?process.env=>${encodeURIComponent(JSON.stringify(process.env))}!${encodeURI(path.join(__dirname, '../../app/javascript/mastodon/service_worker/entry.js'))}`,
cacheName: 'mastodon',
output: '../assets/sw.js',
publicPath: '/sw.js',