diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2022-05-09 17:57:57 +0000 |
---|---|---|
committer | Yamagishi Kazutoshi <ykzts@desire.sh> | 2022-09-11 16:05:01 +0000 |
commit | 64ee565b339eefbeb601200611f9fd08174135ef (patch) | |
tree | 6b33c9efa711ed0b820392f7eadd6bb9375ca6d7 /config/webpack/webpack.config.js | |
parent | 0aacf00f5b77264537aa87fb8f78d7346feb1ec4 (diff) | |
download | mastodon-deps/shakapacker.tar mastodon-deps/shakapacker.tar.gz mastodon-deps/shakapacker.tar.bz2 mastodon-deps/shakapacker.zip |
Replace to shakapacker from webpackerdeps/shakapacker
Diffstat (limited to 'config/webpack/webpack.config.js')
-rw-r--r-- | config/webpack/webpack.config.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/config/webpack/webpack.config.js b/config/webpack/webpack.config.js new file mode 100644 index 000000000..dc70b180c --- /dev/null +++ b/config/webpack/webpack.config.js @@ -0,0 +1,14 @@ +const { existsSync } = require('fs'); +const { resolve } = require('path'); +const { env } = require('shakapacker'); +const baseConfig = require('./environments/base'); + +function getWebpackConfig() { + const { nodeEnv } = env; + const path = resolve(__dirname, 'environments', `${nodeEnv}.js`); + const enviromentConfig = existsSync(path) ? require(path) : baseConfig; + + return enviromentConfig; +} + +module.exports = getWebpackConfig(); |