summaryrefslogtreecommitdiff
path: root/config/webpack.config.js
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-10-19 14:29:43 -0500
committerMike Greiling <mike@pixelcog.com>2017-01-06 10:21:01 -0600
commitdf72d65a025fe2cd6778e560541b7784d5bed6ef (patch)
treecae0d31408086a6a8e6b50de319ea2501c93656a /config/webpack.config.js
parent4c5ff1d08ef5ddb7db432b864e18dd7674fbc116 (diff)
downloadgitlab-ce-df72d65a025fe2cd6778e560541b7784d5bed6ef.tar.gz
compile es6/es2015 with babel
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r--config/webpack.config.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index ea51c9d1af7..b4892a11ad0 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -22,6 +22,19 @@ var config = {
filename: IS_PRODUCTION ? '[name]-[chunkhash].js' : '[name].js'
},
+ module: {
+ loaders: [
+ {
+ test: /\.es6$/,
+ exclude: /node_modules/,
+ loader: 'babel-loader',
+ query: {
+ presets: ['es2015']
+ }
+ }
+ ]
+ },
+
plugins: [
// manifest filename must match config.webpack.manifest_filename
// webpack-rails only needs assetsByChunkName to function properly
@@ -32,7 +45,11 @@ var config = {
modules: false,
assets: true
})
- ]
+ ],
+
+ resolve: {
+ extensions: ['', '.js', '.es6', '.js.es6']
+ }
}
if (!IS_PRODUCTION) {