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' } } ] }