1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-05 10:18:09 +09:00
hotomoe/webpack/webpack.config.ts

36 lines
678 B
TypeScript
Raw Normal View History

2017-05-17 00:00:56 +09:00
/**
* 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),
2017-05-25 13:54:31 +09:00
plugins: plugins(version),
2017-05-17 00:00:56 +09:00
output
};
});