issues
search
mizdra
/
happy-css-modules
Typed, definition jumpable CSS Modules. Moreover, easy!
MIT License
225
stars
5
forks
source link
Obsolete `postprocessor` argument of `DtsContent#writeFile`
#39
Closed
mizdra
closed
2 years ago
mizdra
commented
2 years ago
There is a
postprocessor
option to convert the final output.
https://github.com/mizdra/checkable-css-modules/blob/067e89017f6f42fe0b27718735ec7c02c7e3df26/src/dts-content.ts#L95
This was originally added to format the output by prettier.
https://github.com/Quramy/typed-css-modules/pull/83
However, this option does not support sourcemap.
Therefore, it cannot be used with declarationMap. (This is because the mapping of code positions before and after processing with postprocessor is no longer possible and will be broken.)
https://github.com/mizdra/checkable-css-modules/blob/067e89017f6f42fe0b27718735ec7c02c7e3df26/src/dts-content.ts#L99-L101
Therefore, I will obsolete this option
Instead, I will implement a mechanism to insert a comment at the beginning, such as
// prettier-ignore
.
This will be discussed in a separate issue.
postprocessor
option to convert the final output.// prettier-ignore
.