summaryrefslogtreecommitdiff
path: root/webpack.config.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-12 05:03:12 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-12 05:03:12 +0900
commitfab389e6241acf5eb0500e17972b90e8785199dd (patch)
tree473096d69b1c48ed75f4a1a4f199c5cb1f4f0ecb /webpack.config.ts
parent[Client] Enable code splitting (diff)
downloadsharkey-fab389e6241acf5eb0500e17972b90e8785199dd.tar.gz
sharkey-fab389e6241acf5eb0500e17972b90e8785199dd.tar.bz2
sharkey-fab389e6241acf5eb0500e17972b90e8785199dd.zip
[Client] Stop generate scripts for each languages
Resolve #3172
Diffstat (limited to 'webpack.config.ts')
-rw-r--r--webpack.config.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/webpack.config.ts b/webpack.config.ts
index d924d2b5ff..b0d1a0d40f 100644
--- a/webpack.config.ts
+++ b/webpack.config.ts
@@ -30,7 +30,7 @@ const postcss = {
},
};
-module.exports = Object.keys(locales).map(lang => ({
+module.exports = {
entry: {
desktop: './src/client/app/desktop/script.ts',
mobile: './src/client/app/mobile/script.ts',
@@ -116,9 +116,7 @@ module.exports = Object.keys(locales).map(lang => ({
_VERSION_: JSON.stringify(meta.version),
_CLIENT_VERSION_: JSON.stringify(version),
_CODENAME_: JSON.stringify(codename),
- _LANG_: JSON.stringify(lang),
_LANGS_: JSON.stringify(Object.keys(locales).map(l => [l, locales[l].meta.lang])),
- _LOCALE_: JSON.stringify(locales[lang]),
_ENV_: JSON.stringify(process.env.NODE_ENV)
}),
new webpack.DefinePlugin({
@@ -134,7 +132,7 @@ module.exports = Object.keys(locales).map(lang => ({
],
output: {
path: __dirname + '/built/client/assets',
- filename: `[name].${version}.${lang}.js`,
+ filename: `[name].${version}.js`,
publicPath: `/assets/`
},
resolve: {
@@ -151,4 +149,4 @@ module.exports = Object.keys(locales).map(lang => ({
cache: true,
devtool: false, //'source-map',
mode: isProduction ? 'production' : 'development'
-}));
+};