You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Excluding node_modules but then what about 6to5 deps? #28
Honestly I place 6to5 in the same bag than coffeescript.
I believe that it's polite to compile your modules before hand so that you don't force other people to work with flavors they're not comfortable, specially because es5 is still the middle ground, at least for a while...
You can always use the postinstall hook on npm to compile your module after it has been installed by someone, this way you can always develop in es6 and users will get es5 after they've installed your module.
If you don't exclude the node_modules you'll notice that compiling times will increase a lot, because 6to5 will have to parse every dependency that your application requires, even if they're not in es6.
I realize there may be no good solution but please note you are also saying "throw away module sharing and create more kilobytes for end-users to download". This is not a good solution.
Making users compile their entire node_modules folder is extremely slow (there were issues being opened with people wondering why their builds were taking minutes).
The solution for now is the precompile modules. We're looking to make something smarter than that though.
The problem is obvious, as much as no obvious solution exists.
This is not like the CoffeeScript problem; CoffeeScript was never an ECMA standard. People will be publishing ES6 modules that leave it up to clients to compile or otherwise simply not use. Koa takes this approach by simply refusing to work on node 0.10.x, unless of course clients decide to do the transpiling themselves.
Activity
couto commentedon Feb 4, 2015
Honestly I place 6to5 in the same bag than coffeescript.
I believe that it's polite to compile your modules before hand so that you don't force other people to work with flavors they're not comfortable, specially because es5 is still the middle ground, at least for a while...
You can always use the
postinstallhook on npm to compile your module after it has been installed by someone, this way you can always develop in es6 and users will get es5 after they've installed your module.If you don't exclude the
node_modulesyou'll notice that compiling times will increase a lot, because 6to5 will have to parse every dependency that your application requires, even if they're not in es6.jasonkuhrt commentedon Feb 4, 2015
I realize there may be no good solution but please note you are also saying "throw away module sharing and create more kilobytes for end-users to download". This is not a good solution.
jamiebuilds commentedon Feb 4, 2015
Making users compile their entire
node_modulesfolder is extremely slow (there were issues being opened with people wondering why their builds were taking minutes).The solution for now is the precompile modules. We're looking to make something smarter than that though.
sebmck commentedon Feb 4, 2015
This isn't forced on you at all and you can just change your
excluderegex so I'm not sure what the problem is?jasonkuhrt commentedon Feb 4, 2015
The problem is obvious, as much as no obvious solution exists.
This is not like the CoffeeScript problem; CoffeeScript was never an ECMA standard. People will be publishing ES6 modules that leave it up to clients to compile or otherwise simply not use. Koa takes this approach by simply refusing to work on node 0.10.x, unless of course clients decide to do the transpiling themselves.
Thanks for listening.