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

Make output format (ES6, .cjs, ...) configurable #23

Open
borkdude opened this issue Jul 27, 2022 · 0 comments
Open

Make output format (ES6, .cjs, ...) configurable #23

borkdude opened this issue Jul 27, 2022 · 0 comments

Comments

@borkdude
Copy link
Member

borkdude commented Jul 27, 2022

I think we could make ES6 output vs .cjs or whatever else output configurable, so the compiler API gives you some options, for e.g. when you want to integrate the compiler in a REPL, browser, etc. Reloading ES6 modules is a bit painful so having some "dev" mode or "playground" mode vs "optimized build" mode could be a good idea.

Well, es6 modules are closed for a reason, I think. It makes analyzing / caching / tree-shaking / etc a lot easier. So having the es6 module is good, but in some scenarios you might just want to get a JS snippet and js/eval that inside a browser, while not having the import and export stuff.

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