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

Node.js module output format #18

Open
davidtheclark opened this issue Jun 11, 2017 · 3 comments
Open

Node.js module output format #18

davidtheclark opened this issue Jun 11, 2017 · 3 comments

Comments

@davidtheclark
Copy link

Currently the loader uses ES2015 import and export default. Are you interested in adding options to allow for Node.js module require and module.exports? If so, I could work on a PR.

@ticky
Copy link
Owner

ticky commented Jun 11, 2017

I’d been making moves towards this by making the formatters pretty generic. I could see a future where the API includes the ability to override them, and/or includes versions for each module style.

As an aside, do recent versions of Node handle spread syntax? It’s been a while since I checked! :)

@davidtheclark
Copy link
Author

do recent versions of Node handle spread syntax

For Array spreads, looks like there's support in 4 with a flag and then full support in 5+.

For Object spreads, looks like only 8+ with a flag.

I’d been making moves towards this by making the formatters pretty generic.

Yeah, I think that structure will make the change straightforward. I can try to work out a PR today.

@ticky
Copy link
Owner

ticky commented Jun 11, 2017

Cool! Sounds good to go ahead with keeping, then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants