Skip to content

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

@borkdude

Description

@borkdude

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions