3 ms·
My es6 project starter kit works in any kind of environment without damaging anyone: it provides also the dist/cmj folder for the browserify users or whatever o
by gianlucaguarini 12y ago
My es6 project starter kit works in any kind of environment without damaging anyone: it provides also the dist/cmj folder for the browserify users or whatever other tool you use to load commonjs code.
The reason why I don't want to compile directly using browserify is that its require shim even if it's small, it will be then included in any single script you are going to use in your app, imagine the following use case:
in your app you want to use a.js build with browserify and b.js build with it as well. Now including a.js and b.js in your page you will have 2 times the browserify shim (btw it could be also different depending on the browserify version you have used to compile). But if I provide a distribution folder containing the script cleaned up (without extra code) and the commonjs version of it's a win for everyone.