From ace2bf0f60385d628a3d8da576373c65ded9097e Mon Sep 17 00:00:00 2001 From: Bruno Dias Date: Wed, 4 Oct 2017 01:52:09 -0300 Subject: [PATCH] [chore] added babel-cli to compile and fix dist configuration. --- package.json | 1 + webpack.dist.config.js | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 41d40609..39ec4081 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ ], "license": "MIT", "devDependencies": { + "babel-cli": "^6.26.0", "babel-core": "^6.25.0", "babel-eslint": "^8.0.0", "babel-loader": "^7.1.2", diff --git a/webpack.dist.config.js b/webpack.dist.config.js index 2aa4a059..d2e8faca 100644 --- a/webpack.dist.config.js +++ b/webpack.dist.config.js @@ -1,4 +1,5 @@ var webpack = require('webpack'); +var path = require('path'); var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin; var reactExternal = { @@ -29,7 +30,7 @@ module.exports = { output: { filename: '[name].js', chunkFilename: '[id].chunk.js', - path: 'dist', + path: path.resolve(__dirname, 'dist'), publicPath: '/', libraryTarget: 'umd', library: 'ReactModal' @@ -49,8 +50,8 @@ module.exports = { ], module: { - loaders: [ - { test: /\.js?$/, exclude: /node_modules/, loader: 'babel'} + rules: [ + { test: /\.js?$/, exclude: /node_modules/, use: { loader: 'babel-loader' } } ] }