1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-11-28 23:09:16 +09:00
misskey/webpack/webpack.config.ts

45 lines
880 B
TypeScript
Raw Normal View History

2017-05-17 00:00:56 +09:00
/**
* webpack configuration
*/
import module_ from './module';
import plugins from './plugins';
2017-12-17 04:02:30 +09:00
import langs from '../locales';
2017-05-17 00:00:56 +09:00
import version from '../src/version';
2017-12-17 14:35:30 +09:00
module.exports = Object.keys(langs).map(lang => {
2017-05-17 00:00:56 +09:00
// Chunk name
const name = lang;
// Entries
const entry = {
2017-11-13 18:05:35 +09:00
desktop: './src/web/app/desktop/script.ts',
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',
2017-11-21 05:09:45 +09:00
auth: './src/web/app/auth/script.ts',
sw: './src/web/app/sw.js'
2017-05-17 00:00:56 +09:00
};
const output = {
path: __dirname + '/../built/web/assets',
filename: `[name].${version}.${lang}.js`
};
return {
name,
entry,
2017-12-17 14:35:30 +09:00
module: module_(lang),
2017-11-03 17:46:42 +09:00
plugins: plugins(version, lang),
2017-11-13 18:05:35 +09:00
output,
resolve: {
extensions: [
'.js', '.ts'
]
}
2017-05-17 00:00:56 +09:00
};
});