entry:'./src/entry.js',
output:{
path:__dirname + '/assest/',
filename:'app.js',
publicPath:'/temp/assest'
},
module:{
loaders:[
{
test: /\.js?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['es2015', 'react','stage-1','stage-2','stage-3']
}
},
{
test:/\.less$/,
loader: extractTextWebpackPlugin.extract('style-loader','css-loader!less-loader')//分离出css
},
{
test:/\.jpg|.png$/,
loader:'file-loader?limit=5000&name=../img/[hash:8].[name].[ext]'
},
{
test:/\.html$/,
loader:'html-loader'
}
]
},