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
If you have a yarn-workspaces-based monorepo with custom .babelrc configuration, parcel ignores them.
This is related to #3917 - I'm filing a separate issue because there are other ways to resolve the problem reported there (for example, by adding @babel/plugin-proposal-optional-chaining to the default babel config - which IMO would be a good idea regardless of how this issue is treated).
A possible solution would be to leverage the babelrcRoots option to pass in the package directory (in addition to the monorepo root that is already specified in the root parameter)
🔦 Context
I'm trying to set up a monorepo where the packages are built with parcel2, and I need to customize the babel configuration for some of the packages individually.
💻 Code Sample
You can reproduce the issue in master branch of this repository.
There is a working-example branch that shows the same app (with the same .babelrc) building correctly in the non-monorepo case.
🌍 Your Environment
Software
Version(s)
Parcel
2.0.0-nightly.99
Node
10.16.3
Yarn
1.21.1
Operating System
Mac OSX 10.15.3
The text was updated successfully, but these errors were encountered:
🐛 bug report
If you have a yarn-workspaces-based monorepo with custom
.babelrc
configuration, parcel ignores them.This is related to #3917 - I'm filing a separate issue because there are other ways to resolve the problem reported there (for example, by adding
@babel/plugin-proposal-optional-chaining
to the default babel config - which IMO would be a good idea regardless of how this issue is treated).🎛 Configuration (.babelrc, package.json, cli command)
I have a project configured like this:
🤔 Expected Behavior
The
.babelrc
file in theapp1
project should be respected, andparcel build
should succeed.😯 Current Behavior
parcel build
fails with this error:Interestingly, I get the same error, even when I move the
.babelrc
file to the root of the monorepo.💁 Possible Solution
As @mischnic pointed out here, these lines return a
partialConfig
without a `.babelrcparcel/packages/transformers/babel/src/config.js
Lines 36 to 40 in 92fd22f
A possible solution would be to leverage the
babelrcRoots
option to pass in the package directory (in addition to the monorepo root that is already specified in theroot
parameter)🔦 Context
I'm trying to set up a monorepo where the packages are built with parcel2, and I need to customize the babel configuration for some of the packages individually.
💻 Code Sample
You can reproduce the issue in
master
branch of this repository.There is a
working-example
branch that shows the same app (with the same.babelrc
) building correctly in the non-monorepo case.🌍 Your Environment
The text was updated successfully, but these errors were encountered: