Skip to content

Commit ace2bf0

Browse files
committed
[chore] added babel-cli to compile and fix dist configuration.
1 parent 876972b commit ace2bf0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
],
2323
"license": "MIT",
2424
"devDependencies": {
25+
"babel-cli": "^6.26.0",
2526
"babel-core": "^6.25.0",
2627
"babel-eslint": "^8.0.0",
2728
"babel-loader": "^7.1.2",

Diff for: webpack.dist.config.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var webpack = require('webpack');
2+
var path = require('path');
23
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
34

45
var reactExternal = {
@@ -29,7 +30,7 @@ module.exports = {
2930
output: {
3031
filename: '[name].js',
3132
chunkFilename: '[id].chunk.js',
32-
path: 'dist',
33+
path: path.resolve(__dirname, 'dist'),
3334
publicPath: '/',
3435
libraryTarget: 'umd',
3536
library: 'ReactModal'
@@ -49,8 +50,8 @@ module.exports = {
4950
],
5051

5152
module: {
52-
loaders: [
53-
{ test: /\.js?$/, exclude: /node_modules/, loader: 'babel'}
53+
rules: [
54+
{ test: /\.js?$/, exclude: /node_modules/, use: { loader: 'babel-loader' } }
5455
]
5556
}
5657

0 commit comments

Comments
 (0)