Skip to main content
8 events
when toggle format what by license comment
Jan 22 at 20:29 comment added Timo I do not use type:module in package.json - default is commonjs and now the imports work as described by Anonymous Creator. I import from mjs files and not js.
Jan 21 at 18:08 comment added Timo I have mts files that get converted to mjs. I import from these mjs and still get the error.
Jul 8, 2023 at 2:57 history edited Anonymous Creator CC BY-SA 4.0
added 49 characters in body
Jun 2, 2023 at 6:55 history edited Anonymous Creator CC BY-SA 4.0
added 31 characters in body
May 30, 2023 at 4:08 history edited Anonymous Creator CC BY-SA 4.0
deleted 4 characters in body
Apr 30, 2022 at 21:18 comment added Oleg Valter is with Ukraine Quick note is that .js extension is because the TS team is outspoken for not wanting to rewrite paths (see Ryan's comment here). That does not take away from the fact that the answer is, indeed, correct - if ESM is used in tests, the target should be set accordingly.
Mar 17, 2022 at 12:44 vote accept Anonymous Creator
Mar 15, 2022 at 19:26 history answered Anonymous Creator CC BY-SA 4.0