Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parcel fetching configs from where it's installed instead of where the process is running #9602

Open
mojtabast opened this issue Mar 27, 2024 · 0 comments

Comments

@mojtabast
Copy link

馃悰 bug report

Parcel looking for configs from where its installed, not where the binary is running. For monorepos, This can be problematic when parcel installed in the workspace root.

馃帥 Configuration (.babelrc, package.json, cli command)

cli:
parcel build

package.json:

  "@parcel/resolver-default": {
    "packageExports": true
  }

馃 Expected Behavior

When parcel running from packages, it should start from where it's running and not where it's installed.

馃槸 Current Behavior

Applying configs from nearest package.json that parcel installed there as well.

馃拋 Possible Solution

Start getting configs where process is going to be run.

馃敠 Context

We've installed parcel in root because there are some clients that need to being built by Parcel. We need to be able to config each client separately and not globally essentially .

Consider this structure:

/    <- parcel installed here
/packages/client1
/packages/client2

When we are adding the following config to /packages/client1 it doesn't work:

  "@parcel/resolver-default": {
    "packageExports": true
  }

But when add to /package.json (workspace) root it will be applied correctly.

馃捇 Code Sample

(https://github.com/mojtabast/parcel-resolve-config-from-root)

馃實 Your Environment

Software Version(s)
Parcel ^2.12.0
Node v20.9.0
npm/Yarn yarn 1.22.19
Operating System Mac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant