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
When using --target node still prefer reading the node target from .babelrc if present.
🤔 Expected Behavior
if a .babelrc file is present and I use --target node I would like my explicit babel preset-env node version to be the target.
😯 Current Behavior
Currently, if --target node is found then the engines field is automatically used regardless of .babelrc the parceljs code
💁 Possible Solution
when --target node prefer .babelrc over node engines field value.
🔦 Context
Firebase uses the engines field to specify the runtime for their Cloud Functions. They only support two specific numbers here, no semver ranges. Just
"engines": "6""engines": "8"
This causes issues when I want to dev in Node 10 with Yarn because the engines field does is not using a range, so I get an incompat node version error.
If it is omitted, then Node 6 is targetted, which would be fine, except that Parcel defaults to Node 8.
I asked to add range support to firebase which would solve the issue, but it does not seem like they will be addressing this on their end anytime soon.
If I could tell Parcel to target Node 6 via .babelrc then I could leave off the engines field and Firebase would target Node 6 and I could dev with Node 10 LTS & Yarn
I'm unsure what implications this could have on existing projects.
💻 Examples
The text was updated successfully, but these errors were encountered:
jthegedus
changed the title
prefer babelrc defined node version target of engines field when --target node
prefer babelrc defined node version target over engines field when --target node
Dec 6, 2018
jthegedus
changed the title
prefer babelrc defined node version target over engines field when --target node
prefer babelrc defined node version target over pkg json engines field when --target node
Dec 6, 2018
🙋 feature request
When using
--target node
still prefer reading the node target from.babelrc
if present.🤔 Expected Behavior
if a
.babelrc
file is present and I use--target node
I would like my explicit babel preset-env node version to be the target.😯 Current Behavior
Currently, if
--target node
is found then the engines field is automatically used regardless of.babelrc
the parceljs code
💁 Possible Solution
when
--target node
prefer.babelrc
over nodeengines
field value.🔦 Context
Firebase uses the
engines
field to specify the runtime for their Cloud Functions. They only support two specific numbers here, no semver ranges. JustThis causes issues when I want to dev in Node 10 with Yarn because the engines field does is not using a range, so I get an
incompat node version
error.If it is omitted, then Node 6 is targetted, which would be fine, except that Parcel defaults to Node 8.
I asked to add range support to firebase which would solve the issue, but it does not seem like they will be addressing this on their end anytime soon.
If I could tell Parcel to target Node 6 via
.babelrc
then I could leave off theengines
field and Firebase would target Node 6 and I could dev with Node 10 LTS & YarnI'm unsure what implications this could have on existing projects.
💻 Examples
The text was updated successfully, but these errors were encountered: