-
-
Notifications
You must be signed in to change notification settings - Fork 796
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
add "exports" field to support newer module resolutions like node16 #1007
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
On that note, shoelace requires node v14. The exports field is supported since node 12. It might be a good idea to get rid of the |
Looks good to me. Thanks for jumping on this! Did you want to update the PR to remove |
@claviska I refrained from updating the PR to remove |
Whups just crossed my mind: The minimum TypeScript version would be 4.5 if |
Nice catch. I'll leave |
It would be helpful if you could release a new version. Otherwise, users of shoelace can't use |
Waiting for release of shoelace-style/shoelace#1007
Setting the
moduleResolution
in the tsconfig to node16 results in no types being resolved.I suppose the reason is a lacking
exports
field inpackage.json
. See https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing. I haven't tested it but expect the exports field to solve the bug + it's a good idea anyways.With node16 module resolution (the new module resolution)
![image](https://user-images.githubusercontent.com/35429197/201970824-789e4f37-c9f7-4e0c-9b71-e78abb65ac70.png)
With nodenext module resolution (the default)
Here is a reproduction https://stackblitz.com/edit/typescript-3exolv?file=index.ts