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

chore(rspack): update resource query to reduce confusion #28967

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samtsai
Copy link
Contributor

@samtsai samtsai commented Nov 15, 2024

Current Behavior

withReact in rspack adds svg rules to support svgs as assets/urls and React components.

Expected Behavior

Svgr docs use url as resourceQuery value, https://react-svgr.com/docs/webpack/#use-svgr-and-asset-svg-in-the-same-project Having resource query match on react is confusing because you would want the inverse, treat the url as a resource if it has the query and as a React component otherwise.

@samtsai samtsai requested a review from a team as a code owner November 15, 2024 20:29
@samtsai samtsai requested a review from jaysoo November 15, 2024 20:29
Copy link

vercel bot commented Nov 15, 2024

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

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Nov 15, 2024 8:58pm

Svgr docs use `url` as resourceQuery value, https://react-svgr.com/docs/webpack/#use-svgr-and-asset-svg-in-the-same-project
Having resource query match on `react` is confusing because you would want the inverse,
treat the url as a resource if it has the query and as a React component otherwise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants