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,请大神指导
- 2 回答
- 0 关注
- 3323 浏览
添加回答
举报
0/150
提交
取消