Skip to content

support moduleResolution Bundler #612

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

Closed
DetachHead opened this issue Sep 11, 2023 · 2 comments
Closed

support moduleResolution Bundler #612

DetachHead opened this issue Sep 11, 2023 · 2 comments

Comments

@DetachHead
Copy link

DetachHead commented Sep 11, 2023

Is your feature request related to a problem? Please describe.
typescript 5.0 added the new "Bundler" module resolution mode: https://www.typescriptlang.org/tsconfig#moduleResolution

Describe the solution you'd like
add bundler to the list of allowed moduleResolution options

Preprocessing failed
Error: error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.

Describe alternatives you've considered
nodenext which enforces .js file extensions in imports. this breaks many of my dependencies because they assume this isn't needed

How important is this feature to you?
very. none of the other moduleResolution options work for my project:

  • node and classic are for old commonjs projects
  • node16/nodenext doesn't work since some of my dependencies don't include file extensions when importing their own files
@dummdidumm
Copy link
Member

svelte-preprocess is not checking any of these flags, it sounds like you have an old TS version in your project somewhere. If you still think this is a svelte-preprocess error, please provide a reproduction repo.

@DetachHead
Copy link
Author

yeah you're right, i thought i updated to typescript 5 but i was still on 4.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants