diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-05-17 00:00:56 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-05-17 00:00:56 +0900 |
| commit | fb70e3b1769e9d008b75585e7c3fdfa061491f4d (patch) | |
| tree | 0c80a14191c174d850a8021c79ff02b357d63fba /webpack/webpack.config.ts | |
| parent | Merge pull request #462 from syuilo/greenkeeper/mocha-3.4.1 (diff) | |
| download | sharkey-fb70e3b1769e9d008b75585e7c3fdfa061491f4d.tar.gz sharkey-fb70e3b1769e9d008b75585e7c3fdfa061491f4d.tar.bz2 sharkey-fb70e3b1769e9d008b75585e7c3fdfa061491f4d.zip | |
Refactoring
Diffstat (limited to 'webpack/webpack.config.ts')
| -rw-r--r-- | webpack/webpack.config.ts | 35 |
1 files changed, 35 insertions, 0 deletions
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 + }; +}); |