fix(storybook-builder): fix providerImportSource extension when using @storybook/addon-essentials #2703
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
"./../../../node_modules/@storybook/addon-docs/dist/shims/mdx-react-shim"
) without an extension, which is coming from@storybook/addon-essentials
https://github.com/storybookjs/storybook/blob/v7.6.17/code/addons/essentials/src/docs/preset.ts#L10I didn't catch this bug here, because
wds-outside-root
happens to add an extension when I run tests in a monorepo. But it doesn't happen in simple repos wherewds-outside-root
is not used. Not sure how to improve tests in such a way that it happens here, the risk is if I do more like in a simple repo, then the monorepo setup won't be tested. So I'll keep things as is, especially given it's such a weird and rare bug.I'll try to fix it in the Storybook too, but it takes time, older version should work too since we start to migraate users and I'm not sure it's gonna be backported to Storybook 7 which we need to support for now: storybookjs/storybook#26868