Documentation: Add FAQ about Nextjs plugin in portable stories#32014
Conversation
There was a problem hiding this comment.
2 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile
| ### Nextjs vite cannot find module | ||
|
|
||
| If you are seeing error messages like `Cannot find module 'sb-original/image-context'` ensure you have included `storybookNextJsPlugin` |
There was a problem hiding this comment.
style: Heading uses different case style than other troubleshooting sections. Change 'Nextjs vite' to 'Next.js Vite' to match documentation style.
|
View your CI Pipeline Execution ↗ for commit fbc89a6
☁️ Nx Cloud last updated this comment at |
jonniebigodes
left a comment
There was a problem hiding this comment.
@cabbiepete, thanks for putting together this pull request and helping us improve the documentation by adding these useful caveats. We appreciate it 🙏 !
I've left a small item for you to look into when you can. Let me know once you've addressed it and the feedback from Greptile so that we can merge this into the documentation.
Hope you have a fantastic day.
Stay safe
|
@cabbiepete, I was wondering if you have the time to address the feedback, so that we can get this pull request merged in and published in our documentation. Let me know and we'll go from there. Have a great week Stay safe |
|
@cabbiepete just a reminder to see if you have the time to address the feedback, so that we can get this in. Let me know and we'll go from there. Have a great day. Stay safe |
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughAdds a new Vite configuration snippet for manually including the Storybook Next.js plugin and updates React testing docs with troubleshooting guidance for a module resolution error and a reference to the new snippet. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)docs/**📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🪛 LanguageTooldocs/_snippets/vite-includeStorybookNextjsPlugin.md[grammar] ~1-~1: Hier könnte ein Fehler sein. (QB_NEW_DE) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (1)
Comment |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Closes #
What I did
Added docs for testing where you are reusing stories in vitest and using the nextjs-vite framework.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>Greptile Summary
Added documentation for testing stories with Vitest in Next.js Vite environments, specifically addressing module resolution issues.
docs/_snippets/vite-includeStorybookNextjsPlugin.mdshowing configuration for Storybook Next.js Vite plugindocs/writing-tests/integrations/stories-in-unit-tests.mdxwith troubleshooting section for 'sb-original/image-context' errorSummary by CodeRabbit