var webpack = require('webpack');
var path = require('path');
module.exports = {
entry:{
app:'./demo/app.js'
},
output:{
path:'./demo/build/',
filename:'[name].bundle.js'
},
module:{
loaders:[
{
test:/\.(js|jsx)$/,
loader:'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015','react-es2015']
}
}
]
},
resolve:{
extensions:['','.js','.jsx']
}
};
转载于:https://my.oschina.net/wlybhy/blog/617650