summaryrefslogtreecommitdiff
path: root/webpack/webpack.config.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-05-17 00:00:56 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-05-17 00:00:56 +0900
commitfb70e3b1769e9d008b75585e7c3fdfa061491f4d (patch)
tree0c80a14191c174d850a8021c79ff02b357d63fba /webpack/webpack.config.ts
parentMerge pull request #462 from syuilo/greenkeeper/mocha-3.4.1 (diff)
downloadsharkey-fb70e3b1769e9d008b75585e7c3fdfa061491f4d.tar.gz
sharkey-fb70e3b1769e9d008b75585e7c3fdfa061491f4d.tar.bz2
sharkey-fb70e3b1769e9d008b75585e7c3fdfa061491f4d.zip
Refactoring
Diffstat (limited to 'webpack/webpack.config.ts')
-rw-r--r--webpack/webpack.config.ts35
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
+ };
+});