If you want to stick with CommonJS/Browserify that's fine for you of course, I just want to know if this project is something I want to be using.
Hey @depoulo, thanks for opening this issue! We currently already support ES6 modules through tooling. However we can't consider switching the codebase to use import unless https://github.com/substack/node-browserify/issues/1186 resolves in favor of it - which in turn depends on the TC39 solving compatibility issues the spec has with node(1)'s require() function. So for the foreseeable future we're unlikely to switch to alternate syntax.
That said, the tooling for require() should be pretty good as is. I'm not sure about the IDE story, but dead code removal (popularized in JS land as "tree shaking") is not exclusive to ES6 modules. Though I'm not sure there'd be much code to toss anyway, since we control all but two dependencies in the choo tree (if I'm not mistaken).
I'm going to close this for now as there isn't a lot to discuss at this point in time, but if https://github.com/substack/node-browserify/issues/1186 resolves in favor of import I'd be more than happy to start debating the merits of either syntax. I hope this answers your question - cheers! :grin:
It sure does, thx!
Most helpful comment
Hey @depoulo, thanks for opening this issue! We currently already support ES6 modules through tooling. However we can't consider switching the codebase to use
importunless https://github.com/substack/node-browserify/issues/1186 resolves in favor of it - which in turn depends on the TC39 solving compatibility issues the spec has withnode(1)'srequire()function. So for the foreseeable future we're unlikely to switch to alternate syntax.That said, the tooling for
require()should be pretty good as is. I'm not sure about the IDE story, but dead code removal (popularized in JS land as "tree shaking") is not exclusive to ES6 modules. Though I'm not sure there'd be much code to toss anyway, since we control all but two dependencies in thechootree (if I'm not mistaken).I'm going to close this for now as there isn't a lot to discuss at this point in time, but if https://github.com/substack/node-browserify/issues/1186 resolves in favor of
importI'd be more than happy to start debating the merits of either syntax. I hope this answers your question - cheers! :grin: