summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-02-06 14:15:44 +0000
committerFatih Acet <acetfatih@gmail.com>2017-02-06 14:15:44 +0000
commit0b97dd7ee4d63f9380c476ec31d170d2601f793a (patch)
tree69d84eb9e9037d874b2f47b4c8d6122977a51f9e
parent674a1aee453ae141d327fc40d427fa20f5e6fa87 (diff)
parent63e79294369d4066f141aa6fc16eaf51de547c07 (diff)
downloadgitlab-ce-0b97dd7ee4d63f9380c476ec31d170d2601f793a.tar.gz
Merge branch 'babel-all-the-things' into 'master'
Use babel to transpile all non-vendor javascript assets regardless of file extension See merge request !8988
-rw-r--r--changelogs/unreleased/babel-all-the-things.yml5
-rw-r--r--config/webpack.config.js4
-rw-r--r--package.json6
3 files changed, 11 insertions, 4 deletions
diff --git a/changelogs/unreleased/babel-all-the-things.yml b/changelogs/unreleased/babel-all-the-things.yml
new file mode 100644
index 00000000000..fda1c3bd562
--- /dev/null
+++ b/changelogs/unreleased/babel-all-the-things.yml
@@ -0,0 +1,5 @@
+---
+title: use babel to transpile all non-vendor javascript assets regardless of file
+ extension
+merge_request: 8988
+author:
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 7cd92af7d93..a156756f9ff 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -49,8 +49,8 @@ var config = {
module: {
loaders: [
{
- test: /\.es6$/,
- exclude: /node_modules/,
+ test: /\.(js|es6)$/,
+ exclude: /(node_modules|vendor\/assets)/,
loader: 'babel-loader',
query: {
// 'use strict' was broken in sprockets-es6 due to sprockets concatination method.
diff --git a/package.json b/package.json
index 73fb487b973..9581d966237 100644
--- a/package.json
+++ b/package.json
@@ -1,12 +1,14 @@
{
"private": true,
"scripts": {
- "dev-server": "node_modules/.bin/webpack-dev-server --config config/webpack.config.js",
+ "dev-server": "webpack-dev-server --config config/webpack.config.js",
"eslint": "eslint --max-warnings 0 --ext .js,.js.es6 .",
"eslint-fix": "npm run eslint -- --fix",
"eslint-report": "npm run eslint -- --format html --output-file ./eslint-report.html",
"karma": "karma start config/karma.config.js --single-run",
- "karma-start": "karma start config/karma.config.js"
+ "karma-start": "karma start config/karma.config.js",
+ "webpack": "webpack --config config/webpack.config.js",
+ "webpack-prod": "NODE_ENV=production npm run webpack"
},
"dependencies": {
"babel": "^5.8.38",