Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-10-19 22:29:43 +0300
committerMike Greiling <mike@pixelcog.com>2017-01-06 19:21:01 +0300
commitdf72d65a025fe2cd6778e560541b7784d5bed6ef (patch)
treecae0d31408086a6a8e6b50de319ea2501c93656a /config
parent4c5ff1d08ef5ddb7db432b864e18dd7674fbc116 (diff)
compile es6/es2015 with babel
Diffstat (limited to 'config')
-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) {