diff options
| author | こぴなたみぽ <Syuilotan@yahoo.co.jp> | 2017-11-06 19:05:44 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-06 19:05:44 +0900 |
| commit | 04bdc5df405479e94ab5117a0a39005cfe385556 (patch) | |
| tree | d27280152bdad0bd323f238f06f5a356e5141c31 /webpack | |
| parent | chore(package): update @types/webpack to version 3.0.14 (diff) | |
| parent | Merge pull request #845 from syuilo/greenkeeper/@types/gulp-4.0.5 (diff) | |
| download | misskey-04bdc5df405479e94ab5117a0a39005cfe385556.tar.gz misskey-04bdc5df405479e94ab5117a0a39005cfe385556.tar.bz2 misskey-04bdc5df405479e94ab5117a0a39005cfe385556.zip | |
Merge branch 'master' into greenkeeper/@types/webpack-3.0.14
Diffstat (limited to 'webpack')
| -rw-r--r-- | webpack/plugins/const.ts | 3 | ||||
| -rw-r--r-- | webpack/plugins/index.ts | 4 | ||||
| -rw-r--r-- | webpack/webpack.config.ts | 3 |
3 files changed, 6 insertions, 4 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() ]; diff --git a/webpack/webpack.config.ts b/webpack/webpack.config.ts index 5199285d55..97782a4102 100644 --- a/webpack/webpack.config.ts +++ b/webpack/webpack.config.ts @@ -16,6 +16,7 @@ module.exports = langs.map(([lang, locale]) => { const entry = { desktop: './src/web/app/desktop/script.js', mobile: './src/web/app/mobile/script.js', + ch: './src/web/app/ch/script.js', stats: './src/web/app/stats/script.js', status: './src/web/app/status/script.js', dev: './src/web/app/dev/script.js', @@ -31,7 +32,7 @@ module.exports = langs.map(([lang, locale]) => { name, entry, module: module_(lang, locale), - plugins: plugins(version), + plugins: plugins(version, lang), output }; }); |