fix(plugin): add root export entry for steiger plugin - #228
Conversation
🦋 Changeset detectedLatest commit: 4113662 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Solant
left a comment
There was a problem hiding this comment.
The current conditional export is valid, as per https://nodejs.org/api/packages.html#conditional-exports
It also properly resolves locally, so I don't think we need this change.
|
Does this change actually solve the problem in that issue, btw? Didn't try myself yet, just wondering |
|
@illright I checked it myself; the problem in the referenced issue is due to pnpm hoisting, not conditional export. The current conditional export works correctly. |
|
Yeah, but pnpm is the industry standard now, and package isolation is one of its central selling points, if it doesn't work with pnpm out of the box, then it's an issue on our side |
|
In this case we need to remove import { defineConfig } from 'steiger'
import fsd from '@feature-sliced/steiger-plugin'
export default defineConfig([
...fsd.configs.recommended,
])Because the current zero-config approach relies heavily on hoisting (which is disabled by default in pnpm). I think we can do some auto resolutions in It looks like you tried to do something like that in #197 |
If it's your direct dependency, then pnpm will put it on the top level of |
|
Ah, yes, we have a But I still don't think we need this |
@Solant Thanks for review. I think you're right. The reason I decided to make this change is because I looked at all the exports for the monorepo, and they all use "exports": {
".": {I wanted to make it consistent and fix the problem of cource. In any case, we can close the issue and PR. |
|
Let's wait with closing until we hear from the issue author :) |
Fix package root exports for
@feature-sliced/steiger-plugin.Closes #225