How to use absolute path to import custom scss, when using react + webpack?

后端 未结 4 1429
北恋
北恋 2021-02-05 04:47

Inside a scss file, I\'m trying to import custom, widely used chunk of scss (in a React/SASS/Webpack stack).

So that I can use a shared mixin.

Let\'s say I\'m cr

4条回答
  •  别那么骄傲
    2021-02-05 05:32

    If you use Create React App v3 which allows absolute imports you can use the tilde

    @import "~theme/colors";
    

提交回复
热议问题