首页 > 解决方案 > 构建时 Electron post-scss webpack 解析器错误

问题描述

这是来自电子反应的样板。我试图包含 scss mixins,但它似乎吐出以下错误:

CssSyntaxError: C:\C:\app\scss\base\_theme.scss:30:17: Unknown word
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser

  28 | @mixin themed() {
  29 |     @each $theme, $map in $themes {
> 30 |       .theme--#{$theme} & {
     |                 ^
  31 |         $theme-map: () !global;
  32 |         @each $key, $submap in $map {

我已将 postcss-loader 包含在 webpack 中,但错误仍然存​​在

标签: reactjswebpacksasselectronelectron-react-boilerplate

解决方案


推荐阅读