ember-headless-form icon indicating copy to clipboard operation
ember-headless-form copied to clipboard

Fix incorrect package.json#exports

Open NullVoxPopuli opened this issue 10 months ago • 4 comments

Resolves: https://github.com/embroider-build/embroider/issues/2329

NullVoxPopuli avatar Mar 10 '25 17:03 NullVoxPopuli

⚠️ No Changeset found

Latest commit: 955a8c94eef5bf5e913ec1495195d66029a7eebe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Mar 10 '25 17:03 changeset-bot[bot]

I think this is an actual bug in Embroider (vite), so this change would only work around it.

It's a valid exports config according to these docs: https://nodejs.org/api/packages.html#package-entry-points

Windvis avatar Mar 11 '25 10:03 Windvis

Thanks for bringing this up! I could get convinced to merge this as a workaround to unblock people, but I do agree this seems more like a bug in Embroider. The exports map was done like this very intentionally.

simonihmig avatar Mar 11 '25 12:03 simonihmig

I've patched this workaround onto my project, but it would be nice if it wasn't needed. What does a fix for this look like? I've read @Windvis' investigation but I don't really understand how verifying if the resulting target being importable would fix it, so if we find it's not importable, what should actually happen? Is embroider supposed to start guessing for the actual import path? If ./-private/* is set to null isn't vite supposed to fail when importing from that location?

evoactivity avatar Jun 23 '25 13:06 evoactivity