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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exports map resolver config within monorepos #9078

Closed
achingbrain opened this issue Jun 7, 2023 · 1 comment
Closed

Exports map resolver config within monorepos #9078

achingbrain opened this issue Jun 7, 2023 · 1 comment
Labels
Stale Inactive issues

Comments

@achingbrain
Copy link

🐛 bug report

I see that from 2.9.x Parcel supports the package.json exports map with a small config change, great!

I was adding an example using Parcel to helia-examples - it's a monorepo consisting of lots of different projects. They all pertain to Helia - a project that uses only an exports map.

Parcel is executed from the /examples/helia-parcel directory so I added the @parcel/resolver-default config key to the Parcel example's package.json file but it didn't work.

It only started working when I added it to the root package.json which doesn't seem right.

Also, possibly related is that the .parcel-cache directory appears in the root of the monorepo instead of in /examples/helia-parcel where the command is executed.

🎛 Configuration (.babelrc, package.json, cli command)

No config other than:

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

CLI:

parcel build src/index.html
parcel serve src/index.html --open -p 8888

🤔 Expected Behavior

Parcel should use the config keys in the local package.json and not require them to be elsewhere.

😯 Current Behavior

Parcel needs it in the monorepo parent package.json.

💁 Possible Solution

🤷

🔦 Context

The example needs extra configuration in an unrelated location, which is confusing for users.

💻 Code Sample

See: https://github.com/ipfs-examples/helia-examples

🌍 Your Environment

Software Version(s)
Parcel 2.9.1
Node 18.16.0
npm/Yarn npm 9.6.7
Operating System Mac OS X
Copy link

github-actions bot commented Dec 4, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

@github-actions github-actions bot added the Stale Inactive issues label Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Inactive issues
Projects
None yet
Development

No branches or pull requests

1 participant