From fb70e3b1769e9d008b75585e7c3fdfa061491f4d Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 17 May 2017 00:00:56 +0900 Subject: Refactoring --- webpack/webpack.config.ts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 webpack/webpack.config.ts (limited to 'webpack/webpack.config.ts') diff --git a/webpack/webpack.config.ts b/webpack/webpack.config.ts new file mode 100644 index 0000000000..50733a6cff --- /dev/null +++ b/webpack/webpack.config.ts @@ -0,0 +1,35 @@ +/** + * webpack configuration + */ + +import module_ from './module'; +import plugins from './plugins'; + +import langs from './langs'; +import version from '../src/version'; + +module.exports = langs.map(([lang, locale]) => { + // Chunk name + const name = lang; + + // Entries + const entry = { + 'desktop': './src/web/app/desktop/script.js', + 'mobile': './src/web/app/mobile/script.js', + 'dev': './src/web/app/dev/script.js', + 'auth': './src/web/app/auth/script.js' + }; + + const output = { + path: __dirname + '/../built/web/assets', + filename: `[name].${version}.${lang}.js` + }; + + return { + name, + entry, + module: module_(lang, locale), + plugins: plugins(), + output + }; +}); -- cgit v1.2.3-freya