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

fix(nextjs): Svg should work when svgr is true in next config #21761

Merged
merged 1 commit into from Feb 10, 2024

Conversation

ndcunningham
Copy link
Contributor

Current Behavior

When we set svgr to true and we have a svg resource loaded serving that app fails to load.

const nextConfig = {
  nx: {
    // Set this to true if you would like to use SVGR
    // See: https://github.com/gregberge/svgr
    svgr: true,
  },
};

Expected Behavior

When svgr is set to true and there is a svgr resource the app should not fail to load.

Related Issue(s)

Fixes #20972

@ndcunningham ndcunningham added the scope: nextjs Issues related to NextJS support for Nx label Feb 9, 2024
@ndcunningham ndcunningham self-assigned this Feb 9, 2024
@ndcunningham ndcunningham requested a review from a team as a code owner February 9, 2024 22:31
Copy link

vercel bot commented Feb 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Feb 10, 2024 0:34am

@ndcunningham ndcunningham merged commit b1d0294 into master Feb 10, 2024
6 checks passed
@ndcunningham ndcunningham deleted the fix/next-js-svg-integration branch February 10, 2024 00:55
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: nextjs Issues related to NextJS support for Nx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nx's Next.js SVGR integration conflicts with Next.js own features that load SVGs
2 participants