about summary refs log tree commit diff
path: root/config/webpack/production.js
diff options
context:
space:
mode:
Diffstat (limited to 'config/webpack/production.js')
-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',