about summary refs log tree commit diff
path: root/config/webpack
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2018-03-27 19:32:30 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-03-27 12:32:30 +0200
commitca42f9b0ebfa1f4e8e86745a79af138b5865daee (patch)
tree8892a8d9e2f7cbc621e231a29b89bbee3a590cca /config/webpack
parent31e7b7308489ecc8b43f83b78ec0a288c4195d5b (diff)
Cache media (#6902)
Diffstat (limited to 'config/webpack')
-rw-r--r--config/webpack/production.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/webpack/production.js b/config/webpack/production.js
index e2d7f11dc..e1c681232 100644
--- a/config/webpack/production.js
+++ b/config/webpack/production.js
@@ -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',