markdown-component-loader
markdown-component-loader copied to clipboard
Node.js module output format
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.
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! :)
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.
Cool! Sounds good to go ahead with keeping, then!