diff options
author | David Yip <yipdw@member.fsf.org> | 2018-05-14 14:14:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-14 14:14:00 -0500 |
commit | b5684e987484661ba63fc9815c03667a8a93586e (patch) | |
tree | 755476fb27484fb36bd01578f8f22d4dd8d64562 /config/webpack | |
parent | 46659655439e7d76726aa38ed5d599a795b3790f (diff) | |
parent | ba7ee67498905cbc96d531d45a80e284880e09ee (diff) |
Merge pull request #481 from ThibG/glitch-soc/merge
Merge upstream changes
Diffstat (limited to 'config/webpack')
-rw-r--r-- | config/webpack/configuration.js | 5 | ||||
-rw-r--r-- | config/webpack/production.js | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/config/webpack/configuration.js b/config/webpack/configuration.js index 47883b68d..4d0d28582 100644 --- a/config/webpack/configuration.js +++ b/config/webpack/configuration.js @@ -80,7 +80,10 @@ module.exports = { settings, core, flavours, - env, + env: { + CDN_HOST: env.CDN_HOST, + NODE_ENV: env.NODE_ENV, + }, loadersDir, output, }; 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', |