2017-05-16 08:00:56 -07:00
|
|
|
/**
|
|
|
|
* webpack configuration
|
|
|
|
*/
|
|
|
|
|
|
|
|
import module_ from './module';
|
|
|
|
import plugins from './plugins';
|
|
|
|
|
2017-12-16 11:02:30 -08:00
|
|
|
import langs from '../locales';
|
2017-05-16 08:00:56 -07:00
|
|
|
import version from '../src/version';
|
|
|
|
|
2017-12-16 21:35:30 -08:00
|
|
|
module.exports = Object.keys(langs).map(lang => {
|
2017-05-16 08:00:56 -07:00
|
|
|
// Chunk name
|
|
|
|
const name = lang;
|
|
|
|
|
|
|
|
// Entries
|
|
|
|
const entry = {
|
2017-11-13 01:05:35 -08:00
|
|
|
desktop: './src/web/app/desktop/script.ts',
|
2018-02-09 17:27:05 -08:00
|
|
|
//mobile: './src/web/app/mobile/script.ts',
|
|
|
|
//ch: './src/web/app/ch/script.ts',
|
|
|
|
//stats: './src/web/app/stats/script.ts',
|
|
|
|
//status: './src/web/app/status/script.ts',
|
|
|
|
//dev: './src/web/app/dev/script.ts',
|
|
|
|
//auth: './src/web/app/auth/script.ts',
|
2017-11-20 12:09:45 -08:00
|
|
|
sw: './src/web/app/sw.js'
|
2017-05-16 08:00:56 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
const output = {
|
|
|
|
path: __dirname + '/../built/web/assets',
|
|
|
|
filename: `[name].${version}.${lang}.js`
|
|
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
|
|
name,
|
|
|
|
entry,
|
2017-12-16 21:35:30 -08:00
|
|
|
module: module_(lang),
|
2017-11-03 01:46:42 -07:00
|
|
|
plugins: plugins(version, lang),
|
2017-11-13 01:05:35 -08:00
|
|
|
output,
|
|
|
|
resolve: {
|
|
|
|
extensions: [
|
|
|
|
'.js', '.ts'
|
|
|
|
]
|
2018-02-14 20:18:34 -08:00
|
|
|
},
|
2018-02-15 09:53:54 -08:00
|
|
|
resolveLoader: {
|
|
|
|
modules: ['node_modules', './webpack/loaders']
|
|
|
|
},
|
2018-02-15 02:59:07 -08:00
|
|
|
cache: true,
|
|
|
|
devtool: 'eval',
|
|
|
|
stats: true,
|
|
|
|
profile: true
|
2017-05-16 08:00:56 -07:00
|
|
|
};
|
|
|
|
});
|