From 40f6b51dfc1695fb8ef9c63e56af37d9f1e14994 Mon Sep 17 00:00:00 2001 From: 1ambda <1amb4a@gmail.com> Date: Mon, 27 Feb 2017 11:35:38 +0900 Subject: [PATCH] fix: Update babel configuration --- .../src/main/resources/helium/package.json | 6 ++++-- .../src/main/resources/helium/webpack.config.js | 16 ++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/zeppelin-zengine/src/main/resources/helium/package.json b/zeppelin-zengine/src/main/resources/helium/package.json index cd4e470f287..a6752c83775 100644 --- a/zeppelin-zengine/src/main/resources/helium/package.json +++ b/zeppelin-zengine/src/main/resources/helium/package.json @@ -9,7 +9,9 @@ }, "devDependencies": { "webpack": "^1.12.2", - "babel": "^5.8.23", - "babel-loader": "^5.3.2" + "babel-core": "^6.23.1", + "babel-loader": "^6.3.2", + "babel-preset-es2015": "^6.22.0", + "babel-preset-stage-0": "^6.22.0" } } diff --git a/zeppelin-zengine/src/main/resources/helium/webpack.config.js b/zeppelin-zengine/src/main/resources/helium/webpack.config.js index c318c107d30..69592ae7587 100644 --- a/zeppelin-zengine/src/main/resources/helium/webpack.config.js +++ b/zeppelin-zengine/src/main/resources/helium/webpack.config.js @@ -14,20 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + module.exports = { - entry: ['./'], - output: { - path: './', - filename: 'helium.bundle.js', - }, - resolve: { - root: __dirname + "/node_modules" - }, + entry: './load.js', + output: { path: './', filename: 'helium.bundle.js', }, module: { loaders: [{ test: /\.js$/, - //exclude: /node_modules/, - loader: 'babel-loader' + // DON'T exclude. since zeppelin will bundle all necessary packages: `exclude: /node_modules/,` + loader: 'babel-loader', + query: { presets: ['es2015', 'stage-0'] }, }] } }