You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when I click on a property imported from CSS Modules from VSCode, it jumps to .d.ts. Normally, users expect to jump to .css, not to .d.ts. Therefore, this behavior is confusing to users.
It would be useful to be able to switch the jump destination to .css.
Solution
Add the option --declarationMap to generate a source map for .d.ts which map back to the original .css. This allows VSCode to jump to the css file when clicking on a property.
There is no test yet, but I implemented the necessary features. There are no breaking changes. If the maintainers are interested this feature, please tell me. I will add tests and open a Pull Request.
Problem
Currently, when I click on a property imported from CSS Modules from VSCode, it jumps to
.d.ts. Normally, users expect to jump to.css, not to.d.ts. Therefore, this behavior is confusing to users.It would be useful to be able to switch the jump destination to
.css.Solution
Add the option
--declarationMapto generate a source map for.d.tswhich map back to the original.css. This allows VSCode to jump to the css file when clicking on a property.This option is inspired by the
--declarationMapoption oftsc.PoC
You can try the PoC from the following:
There is no test yet, but I implemented the necessary features. There are no breaking changes. If the maintainers are interested this feature, please tell me. I will add tests and open a Pull Request.
2022-03-28.0.40.19.mov