Skip to content
This repository has been archived by the owner on May 11, 2018. It is now read-only.

Feature: Precompile dependencies based on their engines #435

Closed
sheerun opened this issue Oct 2, 2017 · 2 comments
Closed

Feature: Precompile dependencies based on their engines #435

sheerun opened this issue Oct 2, 2017 · 2 comments

Comments

@sheerun
Copy link

sheerun commented Oct 2, 2017

If I target node 0.10 or 0.12 and some of my dependencies support node >= 4, I need to precompile all of them. Currently it takes too much time (even minutes) for babel to precompile all dependencies (i.e. without ignoring node_modules), but most of them don't need it anyway.

Couldn't babel-preset-env automatically discover the target to precompile to per-package based on engines field? And skip precompiling all together if target of dependency package satisfies target of root package (e.g. if root package has node >= 4, and dependency has node >= 4, then we don't need to recompile them, on the other hand dependency has node >= 8 and e.g. for async functions, then we need to compile it so root package can support node >= 4).

I guess this is superset of #114 but it also includes analysing engines fields of sub-folders and selectively ignoring compilation if not needed.

@Andarist
Copy link
Member

Andarist commented Oct 2, 2017

This is strongly connected to the ongoing discussion here.

@babel-bot
Copy link

This issue has been moved to babel/babel#6599.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants