【问题标题】:SCSS @import mixin in React imported styleReact 导入样式中的 SCSS @import mixin
【发布时间】:2021-11-05 04:02:02
【问题描述】:

我正在尝试在 Create React App 制作的 React App 中使用 SCSS。 我有一个名为 mixin.scss 的文件,我需要在 SCSS 文件中导入,通常我使用 Ruby Compass,这很有效;

@import '_mixin';

但在 CRA 的 React 应用程序中使用 node-sass 似乎不起作用。

我该怎么做才能让它发挥作用?

【问题讨论】:

    标签: reactjs sass create-react-app mixins scss-mixins


    【解决方案1】:

    似乎@import@use 取代,并且 Node-sass 已经过时,目前首选的实现是 Dart-sass (yarn add sass) 所以希望我能够简单地将我的应用程序转换为 Sass 包。 ..

    【讨论】:

      猜你喜欢
      • 2017-04-24
      • 2021-03-21
      • 2015-09-21
      • 1970-01-01
      • 1970-01-01
      • 2013-12-28
      • 2020-10-06
      • 2017-04-08
      • 2022-01-16
      相关资源
      最近更新 更多