microsoft / vscode-loader

An universal Asynchronous Module Definition (AMD) Loader developed primarily to load VSCode's sources.
Other
170 stars 55 forks source link

Support ES6 Modules #56

Open JustinGrote opened 8 months ago

JustinGrote commented 8 months ago

Now that VSCode is on Electron 28 which has ESM support, the loaders need to be updated similarly to allow for extensions to be written in ESM https://github.com/microsoft/vscode/issues/130367#issuecomment-1970816333

Mr-Duda commented 6 months ago

This would be very helpful since https://github.com/microsoft/vscode/pull/210466 is now live.

v4lentin1879 commented 6 months ago

any updates on this one?

Mr-Duda commented 6 months ago

I think this is also related: https://github.com/microsoft/vscode/pull/212727

v4lentin1879 commented 5 months ago

any idea when this is gonna be implemented? It seems like there is no possibility of importing esm modules in commonjs without using a dynamic import.. which again is not supported by vscode

alexander-heimbuch commented 5 months ago

@v4lentin1879 the PR @wataBottl referenced looks interesting. I don't think it will get merged but it seems to be possible.

v4lentin1879 commented 5 months ago

@alexander-heimbuch okay at least something :D Do you have any idea how to do this? Using dynamic imports only works in debug mode.

alexander-heimbuch commented 5 months ago

@v4lentin1879 it looks like it does require a change in the extension loader in core, without it I don't think it possible (or I couldn't manage to get it working).

JustinGrote commented 3 weeks ago

@alexdima are you tracking any work on this?

tats-u commented 3 days ago

Is the blocker the lack of stability of require(esm) or vm.Modules?