Skip to content
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

Implement ES Modules and require #1769

Open
lastmjs opened this issue Apr 27, 2024 · 0 comments
Open

Implement ES Modules and require #1769

lastmjs opened this issue Apr 27, 2024 · 0 comments

Comments

@lastmjs
Copy link
Member

lastmjs commented Apr 27, 2024

What if we actually use QuickJS' ES Modules implementation, and implement require? Then we would just copy over all files into the filesystem and read them from there. This could get rid of weird issues that come from bundling. The idea would be to be like Zwitterion or I think Vite, and just transpile individual files as they're written to disc, or maybe even in real time like ts-node.

Then our bundler won't have to change ES Modules to its own weird require, and we won't have to deal with bundling everything even dynamic imports all at once.

Just an idea, might not be worth it, but maybe. We would also have to deal with bare specifiers.

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

1 participant