Skip to content

fix: handle Storybook and other sites that don't build #496

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

Merged
merged 2 commits into from
Jul 7, 2021

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Jul 7, 2021

Currently if we detect a site as using Next.js and auto-install the plugin then builds will fail with an error message that isn't very intuitive. In a lot of cases these are actual Next.js sites, but the deployed site is building the STorybook rather than the actual site. This is a common enough pattern for it to be worth detecting specifically. This PR detects the build-storybook command and skips the plugin. It also adds an explicit check for the Next build directory after the build, and if it's missing it fails the build with links to docs on configuration or removing the plugin.
Fixes #495

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Jul 7, 2021
@ascorbic ascorbic requested a review from lindsaylevine July 7, 2021 15:03
Copy link

@lindsaylevine lindsaylevine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nnice!!!!!!!!!

@ascorbic ascorbic enabled auto-merge (squash) July 7, 2021 15:32
@ascorbic ascorbic merged commit 9deacfb into main Jul 7, 2021
@ascorbic ascorbic deleted the fix/did-not-build branch July 7, 2021 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect storybook
2 participants