summaryrefslogtreecommitdiff
path: root/web-ui/webpack.production.config.js
diff options
context:
space:
mode:
authorAnike Arni <aarni@thoughtworks.com>2016-12-29 10:54:40 -0200
committerAnike Arni <aarni@thoughtworks.com>2016-12-29 10:54:40 -0200
commitee82bd9ea42fe9acbe0c9750931a899ada335cfa (patch)
tree53084ee80a94bae6db07f712fe8b22ac3a30ea3e /web-ui/webpack.production.config.js
parent639430167b646de6fdbb0f275386dae2856b7e72 (diff)
Move aliases to common folder for local and production compilation
Diffstat (limited to 'web-ui/webpack.production.config.js')
-rw-r--r--web-ui/webpack.production.config.js38
1 files changed, 9 insertions, 29 deletions
diff --git a/web-ui/webpack.production.config.js b/web-ui/webpack.production.config.js
index 78cfe843..bddbbe9c 100644
--- a/web-ui/webpack.production.config.js
+++ b/web-ui/webpack.production.config.js
@@ -1,41 +1,21 @@
var path = require('path');
var webpack = require('webpack');
-var CopyWebpackPlugin = require('copy-webpack-plugin');
+var copyWebpack = require('./config/copy-webpack');
+var aliases = require('./config/alias-webpack');
module.exports = {
- entry: './app/js/index.js',
+ entry: {
+ app: './app/js/index.js',
+ sandbox: './app/js/sandbox.js'
+ },
node: { fs: 'empty' },
output: {
- path: path.join(__dirname, '/dist/'),
- filename: 'app.min.js',
+ path: path.join(__dirname, 'dist'),
+ filename: '[name].js',
publicPath: '/assets/'
},
resolve: {
- alias: {
- 'js': path.join(__dirname, '/app/js'),
- 'flight': path.join(__dirname, '/app/bower_components/flight'),
- 'mail_list': path.join(__dirname, '/app/js/mail_list'),
- 'page': path.join(__dirname, '/app/js/page'),
- 'feedback': path.join(__dirname, '/app/js/feedback'),
- 'DOMPurify': 'dompurify',
- 'i18nextXHRBackend': 'i18next-xhr-backend',
- 'i18nextBrowserLanguageDetector': 'i18next-browser-languagedetector',
- 'hbs': path.join(__dirname, '/app/js/generated/hbs'),
- 'helpers': path.join(__dirname, '/app/js/helpers'),
- 'lib': path.join(__dirname, '/app/js/lib'),
- 'views': path.join(__dirname, '/app/js/views'),
- 'tags': path.join(__dirname, '/app/js/tags'),
- 'mail_list_actions': path.join(__dirname, '/app/js/mail_list_actions'),
- 'user_alerts': path.join(__dirname, '/app/js/user_alerts'),
- 'mail_view': path.join(__dirname, '/app/js/mail_view'),
- 'dispatchers': path.join(__dirname, '/app/js/dispatchers'),
- 'services': path.join(__dirname, '/app/js/services'),
- 'mixins': path.join(__dirname, '/app/js/mixins'),
- 'search': path.join(__dirname, '/app/js/search'),
- 'foundation': path.join(__dirname, '/app/js/foundation'),
- 'features': path.join(__dirname, '/app/js/features/features'),
- 'user_settings': path.join(__dirname, '/app/js/user_settings')
- },
+ alias: aliases,
extensions: ['', '.js']
},
module: {