const path = require('path');
const htmlWebpackPlugin = require('html-webpack-plugin');
const webpack =require('webpack');
module.exports = {
entry:{app:'./src/app.js'},
output:{
filename:'js/[name].bundle.js',
path:path.resolve(__dirname,'dist')
},
module:{
loaders:[
{
test:/\.js$/,
loader:'babel-loader',
exclude:path.resolve(__dirname,'node_modules'),
include:path.resolve(__dirname,'src'),
query:{
presets:['latest']
}
},
{
test:/\.css$/,
loader:'style-loader!css-loader!postcss-loader'
}
]
},
plugins:[
new htmlWebpackPlugin({
filename:'index.html',
template:'index.html',
inject:'body',
}),
new webpack.loaderOptionsPlugin({
options:{
postcss:[require('autoprefixer')({ browsers: ['last 2 versions'] })]
}
})
]
}
我要做的是给css3加前缀,但是拨错
TypeError: webpack.loaderOptionsPlugin is not a constructor,请大神指导
我啊我诶
qq_万法自如_0