如何配置sass和webpack等插件
老师,怎么配置sass和webpack等插件呢~
老师,怎么配置sass和webpack等插件呢~
2018-02-02
我的不是和教学视频一模一样,这是我的,你可以看看,能正常运行
var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: ['./app.js'],
output: {
path: path.resolve(__dirname, './build'),
filename: 'bundle.js'
},
module: {
loaders: [
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{ test: /\.scss$/, loader: 'style-loader!css-loader!sass-loader' },
{ test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192' }
]
}
}
举报