webpack.config.js:
webpackConfig.module.loaders.push({
test: /\.scss$/,
loaders: [
'style',
'css?sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass'
]
});
.. Was ist mit diesem Einfügecode los?Ich kann ihn nicht die ganze Zeit formatieren.
Dann führte index.js sass ein und fügte der Komponente className hinzu, es konnte einfach den Stil nicht finden.
npm run build, überprüfen Sie, ob die Größe von index.css genau dieselbe ist wie vor dem Import von sass
Bitte verfolgen Sie dieses Problem, https://github.com/sorrycc/roadhog/issues/273
webpackConfig.module.loaders.push({
testen: /.scss$/,
loader: _extractTextWebpackPlugin.extract('style','css!postcss!sass')
})
if (env == "Entwicklung") {
webpackConfig.plugins.push(new _extractTextWebpackPlugin('[Name].css'));
}
Die aktuelle Lösung, warten Sie, bis der Autor Sass hinzufügt
Sie konfigurieren eine gute Sache, ich bin nicht faul Konfiguration @sorrycc
Hilfreichster Kommentar
webpackConfig.module.loaders.push({
testen: /.scss$/,
loader: _extractTextWebpackPlugin.extract('style','css!postcss!sass')
})
if (env == "Entwicklung") {
webpackConfig.plugins.push(new _extractTextWebpackPlugin('[Name].css'));
}
Die aktuelle Lösung, warten Sie, bis der Autor Sass hinzufügt