Skip to content

Excluding node_modules but then what about 6to5 deps? #28

Closed

Description

@jasonkuhrt

I don't understand the logic of excluding node_modules from 6to5 compile.

That means ES6-based modules to be compiled beforehand, which means a dep's deps cannot be shared across other deps' deps... This is bad.

Activity

  1. couto commented on Feb 4, 2015

    @couto
    Member

    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.

  2. jasonkuhrt commented on Feb 4, 2015

    @jasonkuhrt
    Author

    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.

  3. jamiebuilds commented on Feb 4, 2015

    @jamiebuilds
    Contributor

    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.

  4. self-assigned this
    on Feb 4, 2015
  5. sebmck commented on Feb 4, 2015

    @sebmck
    Contributor

    This isn't forced on you at all and you can just change your exclude regex so I'm not sure what the problem is?

  6. jasonkuhrt commented on Feb 4, 2015

    @jasonkuhrt
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions