4 ms·
Default exports also have some oddities involving live bindings, since the typical syntax is to export an expression, not a binding, but there are workarounds t
by alangpierce 9y ago
Default exports also have some oddities involving live bindings, since the typical syntax is to export an expression, not a binding, but there are workarounds to make it a real live binding. Here's a GitHub discussion where some people who are pretty good with JavaScript are trying to figure out how to properly implement default exports: https://github.com/rollup/rollup/issues/1078 https://github.com/rollup/rollup/issues/1078
Particularly this comment, which agrees that default exports were a mistake: https://github.com/rollup/rollup/issues/1078#issuecomment-268286496 https://github.com/rollup/rollup/issues/1078#issuecomment-26...
- ricardobeat 9y agoI miss the simplicity of CommonJS. > Ecma Script Modules which finally solved the problem of sharing code between files (modules) on a language level. It was a huge step forward Step forward? We were writing modules just fine in 2010. I don’t know a single project off the top of my head that actually benefits from tree shaking. It has been 5-6 years since modules appeared and there is little to show for it. We could do almost the same with node’s commonjs. You could write code that would run anywhere without pre-processing or transpiling. Every time I see a project where the first three pages of documentation are about setting up Babel and webpack I feel like switching off.