Skip to content
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

Next.js: Fix for @nx/react/plugin/storybook with SVGs #23210

Merged
merged 4 commits into from
Jul 8, 2023

Conversation

daves28
Copy link
Contributor

@daves28 daves28 commented Jun 26, 2023

Closes #

What I did

This issue RyanClementsHax/storybook-addon-next#100 involving storybook-addon-next and the nx plugin @nx/react/plugin/storybook was resolved RyanClementsHax/storybook-addon-next#101, but that fix didn't make it to this equivalent file here in @storybook/nextjs, making that issue still present when using Storybook 7 and @storybook/nextjs as the framework.

I simply copied and pasted the changes that were made there.

How to test

  1. Setup an NX monorepo with Storybook 7. Add @nx/react/plugin/storybook to the main.js config addons property.
  2. Add stories of React components that contain SVGs.
  3. Run nx storybook and ensure the operation succeeds.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • [X ] If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

This issue RyanClementsHax/storybook-addon-next#100 involving storybook-addon-next and the nx plugin @nx/react/plugin/storybook was resolved  RyanClementsHax/storybook-addon-next#101, but that fix didn't make it to this equivalent file here in @storybook/nextjs, making that issue still present when using Storybook 7 and @storybook/nextjs as the framework.
@daves28 daves28 changed the title [Bug] Update webpack.ts for @storybook/nextjs to match past changes made in storybook-addon-next, resolving compilation issues when using @nx/react/plugin/storybook [Bug] Update webpack.ts for @storybook/nextjs to match past changes made in storybook-addon-next, resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs Jun 26, 2023
@daves28 daves28 changed the title [Bug] Update webpack.ts for @storybook/nextjs to match past changes made in storybook-addon-next, resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs Update webpack.ts for @storybook/nextjs to match past changes made in storybook-addon-next, resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs Jun 26, 2023
@valentinpalkovic valentinpalkovic self-requested a review July 6, 2023 07:26
@valentinpalkovic valentinpalkovic added bug nextjs ci:daily Run the CI jobs that normally run in the daily job. labels Jul 6, 2023
@valentinpalkovic valentinpalkovic changed the title Update webpack.ts for @storybook/nextjs to match past changes made in storybook-addon-next, resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs Next.js: Update webpack.ts for @storybook/nextjs to match past changes made in storybook-addon-next, resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs Jul 6, 2023
@valentinpalkovic valentinpalkovic changed the title Next.js: Update webpack.ts for @storybook/nextjs to match past changes made in storybook-addon-next, resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs Jul 6, 2023
@valentinpalkovic valentinpalkovic added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Jul 7, 2023
@valentinpalkovic valentinpalkovic merged commit 8704b36 into storybookjs:next Jul 8, 2023
@valentinpalkovic
Copy link
Contributor

LGTM! Thank you for your contribution!

JReinhold pushed a commit that referenced this pull request Jul 8, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
@shilman shilman changed the title Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs Next.js: Fix compilation when using @nx/react/plugin/storybook with stories that contain SVGs Jul 8, 2023
@shilman shilman changed the title Next.js: Fix compilation when using @nx/react/plugin/storybook with stories that contain SVGs Next.js: Fix for @nx/react/plugin/storybook with stories that contain SVGs Jul 10, 2023
@shilman shilman changed the title Next.js: Fix for @nx/react/plugin/storybook with stories that contain SVGs Next.js: Fix for @nx/react/plugin/storybook with stories containing SVGs Jul 10, 2023
@github-actions github-actions bot mentioned this pull request Jul 10, 2023
8 tasks
JReinhold pushed a commit that referenced this pull request Jul 10, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
JReinhold pushed a commit that referenced this pull request Jul 10, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
JReinhold pushed a commit that referenced this pull request Jul 10, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
JReinhold pushed a commit that referenced this pull request Jul 10, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
JReinhold pushed a commit that referenced this pull request Jul 10, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 10, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 10, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 10, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 10, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 10, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 10, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 11, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 12, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
storybook-bot pushed a commit that referenced this pull request Jul 12, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
@valentinpalkovic valentinpalkovic changed the title Next.js: Fix for @nx/react/plugin/storybook with stories containing SVGs Next.js: Fix for @nx/react/plugin/storybook with SVGs Jul 12, 2023
storybook-bot pushed a commit that referenced this pull request Jul 12, 2023
Next.js: Resolving compilation issues when using @nx/react/plugin/storybook with stories that contain SVGs

(cherry picked from commit 8704b36)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ci:daily Run the CI jobs that normally run in the daily job. nextjs patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants