1

I know this question is asked many times in the community. But those all questions are related to projects that are not created using create-react-app CLI. I have created my app using the create-react-app CLI whose webpack.config.js is placed in the folder node_modules/react-scripts/config/webpack.config.js.

Currently i am importing each scss files with their name. When i used @import "./components/**/*.scss" It throws an error (Screenshot attached).

Is there any configuration to an app which is created using create-react-app to import all the scss files in one scss file using the global selectors.

My App could compile successfully but without importing any scss file when i use the syntax @use "./components/**/*.scss";

enter image description here

tkamath99
  • 629
  • 1
  • 12
  • 32
  • [Is it possible to import a whole directory in sass using @import?](https://stackoverflow.com/q/4778627/2873538) – Ajeet Shah May 13 '21 at 16:33
  • Yes. When i give the name of the style file, it takes it. But while using the global selector * it gives error. I am using @import "components/**/*.scss"; – tkamath99 May 13 '21 at 16:58

0 Answers0