-
-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Requesting support for node16/nodenext module resolution #1441
Comments
This feature is already available in PR #1400 We have to wait till it is merged and published :) |
I'd read through that PR to see if it had this before posting, but not checked the code. So am I correct you are resolving this via using the |
Nope. npm run build |
If something is not clear let me know and I'll try to explain it better 🥳 |
Ok, so I checked out the For example, the import in import { IOCContainer } from "../utils/container"; If instead that compiled to the following it would not cause the error. import { IOCContainer } from "../utils/container.js"; |
We can have |
@kf6kjg Try now |
That looks good! |
@kf6kjg Nice |
Next up is looking for / opening a ticket for moving away from the types being in a separate folder to solve the other problem I'm having... :P |
What are the other problems? |
I've created #1442 to track that problem space as it's orthogonal to this ticket. :) |
I think this can be closed by #1400 🔒 @carlocorradini Can you share your example repo with ESM usage? |
EDIT: Fixed in #1400 - thanks @carlocorradini!
Description
When using this library in a project that has the TSConfig setting
moduleResolution
set tonode16
the TS compiler throws errors on everyimport
andexport ... from
call.Example:
Proposed solution
tsconfig.json#/compilerOptions/moduleResolution
setting tonode16
.import
andexport
paths to have the full path to the target file with the extension.index.js
into explicit being one such.This should have no deleterious effect since, as far as I am aware, no version of TS or Node cared about having the filename and extension until ES6 came along.
The text was updated successfully, but these errors were encountered: