如何在Webpack中使用Sass眼镜?
答
我设法让眼镜在最近的webpack中使用sass-loader工作。
眼镜注入了自己的选项青菜,你可以依次传递作为选项SASS装载机:
[...]
{
test: /\.scss$/,
include: config.paths.assets,
use: ExtractTextPlugin.extract({
fallback: 'style',
publicPath: '../',
use: [
`css?${sourceMapQueryStr}`,
'postcss',
`resolve-url?${sourceMapQueryStr}`,
{
loader: `sass?${sourceMapQueryStr}`,
options: eyeglass({
// sass options...
includePaths: ['/share/scss/'],
eyeglass: {
// eyeglass options
}
})
}
],
}),
},
[...]
是你以往任何时候都能够得到与眼镜工作的WebPack?试图做同样的事情... –