unimported
unimported copied to clipboard
Support pure ESM with .tsx
Related to https://github.com/smeijer/unimported/issues/66.
Unfortunately pathTransforms
doesn't seem to work well when dealing with both .ts
and .tsx
files.
With the new typescript module import path stuff, I believe that the import path needs to be written as whatever extension the built file will have. This means that both .ts
and .tsx
files will be built as .js
files. Unfortunately, pathTransforms
doesn't seem to support mapping .js
files to multiple possible file extensions.
I've ended up just stripping the extension entirely which appears to work?
"pathTransforms": {
"(\\..+)\\.js$": "$1"
}
This project is being archived. Please check the readme for more info.