diff options
author | Anike Arni <aarni@thoughtworks.com> | 2016-12-27 15:15:39 -0200 |
---|---|---|
committer | Anike Arni <aarni@thoughtworks.com> | 2016-12-27 15:15:39 -0200 |
commit | cb4522fa47d5e46312d53a62654f58c4a53c8cc2 (patch) | |
tree | 2bc07218610e051fddd8f745c173965198ae0ec7 /web-ui/webpack.config.js | |
parent | 411e1f8cfa06fbd049fb055a4f453b56acdb7153 (diff) |
Add webpack compilation to build, fix aliases, and add babel
Diffstat (limited to 'web-ui/webpack.config.js')
-rw-r--r-- | web-ui/webpack.config.js | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/web-ui/webpack.config.js b/web-ui/webpack.config.js index 230b50ea..39bdd511 100644 --- a/web-ui/webpack.config.js +++ b/web-ui/webpack.config.js @@ -1,12 +1,22 @@ var path = require('path') module.exports = { + entry: './app/js/index.js', + output: { + path: path.join(__dirname, '/app/js/'), + filename: 'bundle.js', + publicPath: '/assets/js/' + }, 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': path.join(__dirname, '/app/bower_components/DOMPurify/dist/purify.min'), + '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'), @@ -23,7 +33,16 @@ module.exports = { 'features': path.join(__dirname, '/app/js/features/features'), 'user_settings': path.join(__dirname, '/app/js/user_settings') }, - extensions: ['', '.js'], - moduleDirectories: ['app/js'] + extensions: ['', '.js'] + }, + module: { + loaders: [ + { + test: /\.js$/, + exclude: /(node_modules|bower_components)/, + loader: 'babel', + query: { presets: ['es2015']} + } + ] } } |