我的配置文件目前有以下可能相关的代码:Webpack.config之前没有运行萨斯 - 装载机PostCSS-装载机
{
// do not exclude `node_modules`
test: /\.css$/,
loader: ExtractTextPlugin.extract(
'style-loader',
'css',
{ publicPath: '../' }
)
},
{
test: /\.scss$/,
exclude: /node_modules/,
loader: ExtractTextPlugin.extract(
'style-loader',
['css-loader', 'postcss-loader', 'sass-loader'],
{ publicPath: '../' }
)
},
,我第一次运行青菜装载机因为PostCSS装载机(Autoprefixer)是很重要无法访问我拥有的@mixin中的代码。
到目前为止,我已经无法给相关的供应商前缀适用于要导入的@mixin代码。一切正常,如果我移动@mixin码的地方,我@include这符合市场预期。
装载机就像函数一样,这就是为什么它是从右到左。当你使用这个“style!css”时,想象它们就像函数:style(css(file))...在这种情况下,首先调用css。 – TGarrett
嗨,是的,我尝试了重新排序它们以及用'postLoaders'搞乱。我在webpack 1.14.0上。请让我知道你想要什么样的信息!我会尽我所能彻底。 –
阅读我更新的编辑。这应该会帮助你多一点。另外,先调用另一个的问题是什么?你的css和scss不应该有任何样式的问题,不管你真的使用什么顺序... – TGarrett