Closed IvanSavoskin closed 3 years ago
You have include: [PATHS.variables]
, double check this, we have a lot of test on this options, so it should work, you ignore ### How Do We Reproduce?
, so I can't help, sorry, anyway if you create reproducible test repo I will say you why it is not working, without additional information I can't help
PATHS.variables = path.resolve(__dirname, "../src/styles/variables.scss"); The path is correct, if you go through the debug, then the addtionalData function is entered. but no result. If you do this for the global file, then everything works
PATHS.global = path.resolve(__dirname, "../src/styles/globals.scss")
Here is the code for the global file
@import "variables";
$fa-font-path: "~font-awesome/fonts/";
$flags-image-path: "~semantic-ui-sass/images/";
$icons-font-path: "~semantic-ui-sass/icons/";
$font-family: $default-font-family;
@import "~semantic-ui-sass/semantic-ui";
@import "~font-awesome/scss/font-awesome";
@import "~react-tabulator/lib/css/bootstrap/tabulator_bootstrap4.min.css";
@import "~react-tabulator/lib/styles.css";
You can't do it for special import
/use
only for import styles from './styles.scss'
or for entrypoint
I didn't quite understand. What is the difference between globals.scss and variables.scss in this case? A line is added in the globals.scss file via additionalData
Different it now you import your SCSS, we can't modify content inside @import
/@use
, it is limitation
That is, there is no way for me to set a variable with the import of a specific file, so that later it can be used in other files?
Yes, node-sass/dart-sass
limitation
Got it, thanks a lot for the clarification
Expected Behavior
Adding an import line to a specific .scss file using the additionalData option
Actual Behavior
The line is not added, the file remains exactly the same as it was
Code
Trying to add imports with just a line
Trying to add imports using a function
The file where you want to add the import