configure webpack

jh-changes
Shin'ya Ueoka 7 years ago
parent 1d8e92214c
commit 9a6a614466
  1. 6
      webpack.config.js

@ -20,11 +20,11 @@ module.exports = {
module: { module: {
loaders: [ loaders: [
{ {
test: /\.js$/, test: [ /\.js$/, /\.jsx$/ ],
exclude: /node_modules/, exclude: /node_modules/,
loader: 'babel-loader', loader: 'babel-loader',
query: { query: {
presets: [ 'es2015' ] presets: ['es2015', 'react']
} }
}, },
{ {
@ -39,7 +39,7 @@ module.exports = {
}, },
resolve: { resolve: {
extensions: [ '.js' ], extensions: [ '.js', '.jsx' ],
modules: [path.join(__dirname, 'src'), 'node_modules'] modules: [path.join(__dirname, 'src'), 'node_modules']
}, },