Closed Lexe003 closed 9 months ago
@Lexe003
Thanks for your inquiry. I will check it out.
@Lexe003
Does this still happen after updating sass to 1.66.1? I could not reproduce the event in my environment.
@activeguild I tested it on the example react files in this repository:
Please do the following:
$gray100: #f9fafb;
:export { gray100: $gray100; }
@use './colors.module.scss';
.test { color: colors.$gray100; }
Trigger the generator and you'll notice that it adds "readonly gray100: 'gray100'" to the App.module d.ts file - On previous versions of sass it wasn't doing this. It also messes up some other d ts files in another scenario which I can't figur out at the moment.
@Lexe003
What inconsistencies occur when gray100
is added?
This variable is being added to use CSS variables in javascript.
A solution may be possible based on the inconsistencies that occur.
@activeguild not only used variables but all exported colors from @use './colors.module.scss';
are added to the generated App.module.scss.d.ts
. Maybe prevent this from happening to solve the issue?
@Lexe003
How about reading in additionalData
as follows?
https://github.com/activeguild/vite-plugin-sass-dts/blob/e4f183d7f3a38616c269813b97a41386815e6a5d/example/react-sass/vite.config.ts#L13
Fixed issue.
Hello, I've observed a conflict emerging with "sass" version 1.65.1 while updating dependencies.
Unfortunately, I don't have the time right now to provide an example. The problem is that it intermittently includes fields from external sources, as when using the import statement: @use 'Theme/fonts.module';
This behavior didn't occur previously, and it's one of the issues I've encountered. I kindly request you to investigate this matter. Thank you!