question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support TypeScript `"moduleResolution": "node16"`

See original GitHub issue

Description

In TypeScript 4.7, along the property "module": "node16" that enables ESM features in TypeScript, there are new values for the property "moduleResolution": "node16" and "nodenext". Both values allows importing from dependencies with package.json exports, imports, and self-referencing. Right now, this property is hard-coded to "node".

Proposed solution

The svelte-language-server shouldn’t hard-code that property and instead read it from the tsconfig.json

Alternatives

No response

Additional Information, eg. Screenshots

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
dummdidummcommented, Jun 19, 2022

Thank you, not sure how that slipped through. Should be fixed now.

0reactions
dan-petersoncommented, Jun 20, 2022

Should be fixed now.

Confirmed on my end.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Module Resolution - TypeScript
There are two possible module resolution strategies: Node and Classic. You can use the moduleResolution option to specify the module resolution strategy.
Read more >
Add file extension when '--moduleResolution' is 'node16' or ...
TypeScript 4.7: ECMAScript Module Support: Add file extension when '--moduleResolution' is 'node16' or 'nodenext'. Relates to 1.
Read more >
node.js - Force TypeScript to generate export/imports with the ...
Also, moduleResolution should be set to Node16 or NodeNext so ESM ... but TypeScript tooling like auto-imports and path completion will ...
Read more >
ESM TypeScript Usage - GraphQL Code Generator
For supporting ESM within your application, you need to set moduleResolution to node16 and the (output) module type to node16 (see ...
Read more >
Can we support node16 instead of node12 in module for ...
... 'node12', 'nodenext'.; Argument for '--moduleResolution' option must be: 'n… ... You can track this ticket for Typescript 4.7 support:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found