about summary refs log tree commit diff
path: root/config/webpack/production.js
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2018-05-15 00:45:37 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-05-14 17:45:37 +0200
commitd8b3f5fb9a6d394257cedd1fda3f86ff64f21e5b (patch)
tree7d4c20126e51583988b297a9f51878e92edbe378 /config/webpack/production.js
parentd75b63e4fbe3a516378150f58ac348cf87aba226 (diff)
Limit environment variables to expose to webpack (#7480)
Diffstat (limited to 'config/webpack/production.js')
-rw-r--r--config/webpack/production.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/webpack/production.js b/config/webpack/production.js
index e1c681232..a82330791 100644
--- a/config/webpack/production.js
+++ b/config/webpack/production.js
@@ -6,7 +6,7 @@ const CompressionPlugin = require('compression-webpack-plugin');
 const sharedConfig = require('./shared.js');
 const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
 const OfflinePlugin = require('offline-plugin');
-const { publicPath } = require('./configuration.js');
+const { env, publicPath } = require('./configuration.js');
 const path = require('path');
 
 let compressionAlgorithm;
@@ -90,7 +90,7 @@ module.exports = merge(sharedConfig, {
         '**/*.woff',
       ],
       ServiceWorker: {
-        entry: `imports-loader?process.env=>${encodeURIComponent(JSON.stringify(process.env))}!${encodeURI(path.join(__dirname, '../../app/javascript/mastodon/service_worker/entry.js'))}`,
+        entry: `imports-loader?process.env=>${encodeURIComponent(JSON.stringify(env))}!${encodeURI(path.join(__dirname, '../../app/javascript/mastodon/service_worker/entry.js'))}`,
         cacheName: 'mastodon',
         output: '../assets/sw.js',
         publicPath: '/sw.js',