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
I am actually using it in an node --experimental-loader hook. Currently I am planning to just chop off .js extensions, but then there is a perf impact if I chop off the extension and then it must search all extension.
We have options
Is there an option I am missing that handles this?
ESM requires all relative imports to use an extension. TS requires insists on using
.js
inside.ts
files which is left untouched in the output file.See: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html
When trying to resolve
#src/index.js
from a TypeScript file, it should search for#src/index.ts
. The extension needs to be stripped during search.I use this for transpilation on-the-fly.
Would be nice to have a setting to accomplish this.
Workaround
I could just remove '.js' extensions before passing them to
enhanced-resolve
.The text was updated successfully, but these errors were encountered: