typescript-transform-paths
typescript-transform-paths copied to clipboard
[Bug] Import assertion is not supported
The import assertion thing was added in TS by https://github.com/microsoft/TypeScript/commit/ec114b8931bf1ad15fd017ecbacf09e099338820
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#import-assertions
Currently, the import assertion is being lost (since node.assertClause
is not taken into the consideration by typescript-transform-paths
) and so you get the ERR_IMPORT_ASSERTION_TYPE_MISSING
-like error if node >= 16.14 is used (previous versions don't force import assertion, like for importing json files with --experimental-json-modules
arg).
Thanks for the report, @vladimiry ! I apologize for the delay. I've been pretty tied up this year.
I will add support and update this thread when it's ready!
A patch like this https://github.com/vladimiry/ElectronMail/blob/master/patches/typescript-transform-paths%403.3.1.patch resolves the issue for me (not sure if it handles all the cases).
Added in v3.4.0. Let me know if you still have any issues.