4 ms·
Thank you. But here are my concerns: * If I go ES6 I'll require all people importing it to also use an ES6 module bundler -- which means Babel only, or Rollup,
by fiatjaf 9y ago
Thank you. But here are my concerns:
* If I go ES6 I'll require all people importing it to also use an ES6 module bundler -- which means Babel only, or Rollup, which never works.
* If I precompile and expect non-Babel people to use the precompiled then these people will have duplicated dependencies everywhere.
Not complaining, but all this compatibility mess seems hard to me. I use Browserify!
- DiThi 9y agoI see. Then don't go "full ES6" but I prefer exporting an object with the class for reasons I've explained in a comment above. But I do see ES6 modules in the wild, some of them I'm using with other languages. So I guess it's fine to leave it as-is. Or if you want to ensure maximum compatibility, use babel as I suggested but add the sources to .npmignore so they're not duplicated in the published packages.