diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-11-03 17:46:42 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-11-03 17:46:42 +0900 |
| commit | 97f0b29d4a716bf1bba7d12c250062da9b2e7c03 (patch) | |
| tree | bd506a7e872d5dac175ae05c654cb3a9190c8735 /webpack/plugins | |
| parent | typo (diff) | |
| download | sharkey-97f0b29d4a716bf1bba7d12c250062da9b2e7c03.tar.gz sharkey-97f0b29d4a716bf1bba7d12c250062da9b2e7c03.tar.bz2 sharkey-97f0b29d4a716bf1bba7d12c250062da9b2e7c03.zip | |
[Client] set lang
Diffstat (limited to 'webpack/plugins')
| -rw-r--r-- | webpack/plugins/const.ts | 3 | ||||
| -rw-r--r-- | webpack/plugins/index.ts | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/webpack/plugins/const.ts b/webpack/plugins/const.ts index ccfcb45260..f64160b01a 100644 --- a/webpack/plugins/const.ts +++ b/webpack/plugins/const.ts @@ -7,7 +7,8 @@ import * as webpack from 'webpack'; import version from '../../src/version'; const constants = require('../../src/const.json'); -export default () => new webpack.DefinePlugin({ +export default lang => new webpack.DefinePlugin({ VERSION: JSON.stringify(version), + LANG: JSON.stringify(lang), THEME_COLOR: JSON.stringify(constants.themeColor) }); diff --git a/webpack/plugins/index.ts b/webpack/plugins/index.ts index d5191f1555..345af7df9e 100644 --- a/webpack/plugins/index.ts +++ b/webpack/plugins/index.ts @@ -8,9 +8,9 @@ import banner from './banner'; const env = process.env.NODE_ENV; const isProduction = env === 'production'; -export default version => { +export default (version, lang) => { const plugins = [ - constant(), + constant(lang), new StringReplacePlugin(), hoist() ]; |