-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Explore enabling ESM based extensions #135450
Comments
One challenge is that we'd need to intercept calls to
I don't think our current approach works for Node does have an experimental loader api that we could potentially use: https://nodejs.org/api/esm.html#loaders However with the current proposal, I don't think we would be able to hand each extension it's own copy of the vscode api object like we currently do Let's follow along with what node is working on make sure whatever they eventually stabilize supports our use case |
It's also noteworthy that neither Safari nor Firefox support ESM in web-workers (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#browser_compatibility). |
Safari 15 just added support! Just waiting on Firefox now but it looks like there has been some somewhat recent activity on the issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1247687 |
latest node-fetch is esm only, so we can't load it node-fetch/node-fetch#1279 (comment) focusing vscode support of esm in microsoft/vscode#135450
latest node-fetch is esm only, so we can't load it node-fetch/node-fetch#1279 (comment) focusing vscode support of esm in microsoft/vscode#135450
latest node-fetch is esm only, so we can't load it node-fetch/node-fetch#1279 (comment) focusing vscode support of esm in microsoft/vscode#135450
actually, /duplicate of #130367 |
Bringing up #116056 again
VS Code extensions currently use commonJS modules. However Native ECMAScript modules (ESM) are quickly becoming the standard across various JavaScript environments. We should explore what it would require to enable ESM based extensions for VS Code
As background, Node 12 introduced experimental support for modules and Node 14 moved them to stable. The TypeScript team is also currently working to support compiling to node12 compatible modules with TypeScript 4.5: microsoft/TypeScript#44501
The text was updated successfully, but these errors were encountered: