Feature Request: Support non ts/tsx files like .css, .scss, .svg, .png, etc
We use static assets extensively, importing css modules, images, svgs, etc.
None of those paths are transformed with this library, even with modules being declared appropriately.
It would be nice if all imports would properly be transformed to relative
Hey @siosphere, how are you transforming those other files? I am specifically interested in the css files, do you use some plugin for postcss?
@danielpza thanks for marking this as "good first issue", that gives me some confidence I could help implement this :) can you give any guidance on where to start for the implementation?
@danielpza thanks for marking this as "good first issue", that gives me some confidence I could help implement this :) can you give any guidance on where to start for the implementation?
Hey @mfisher87, I would suggest to start looking at the https://github.com/LeDDGroup/typescript-transform-paths/blob/master/src/utils/resolve-module-name.ts file.
TBH This is probably not the easiest issue to get started with, but I won't reject a good PR that fixes the issue and adds test coverage.
I would advice using another alternative that is better supported by typescript & other tools, like nodejs subpaths imports, or yarn link: protocol
Cheers.
Thanks for the advice! Looking in to the options :)