From 97f0b29d4a716bf1bba7d12c250062da9b2e7c03 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 3 Nov 2017 17:46:42 +0900 Subject: [Client] set lang --- webpack/plugins/const.ts | 3 ++- webpack/plugins/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'webpack/plugins') 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() ]; -- cgit v1.2.3-freya