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

Svgs crash the app #23468

Closed
1 of 4 tasks
evgenyshenets91 opened this issue May 17, 2024 · 3 comments
Closed
1 of 4 tasks

Svgs crash the app #23468

evgenyshenets91 opened this issue May 17, 2024 · 3 comments
Assignees

Comments

@evgenyshenets91
Copy link

evgenyshenets91 commented May 17, 2024

Current Behavior

After upgrading from 18nx to 19 in React project I have this issue:
Failed to execute 'createElement' on 'Document': The tag name provided ('http://localhost:4200/fintiba-logo.939a27c492f3b4a984045f1df5584f2b.svg') is not a valid name.

I checked if replace it with import { ReactComponent as Logo } from './logo.svg'; it works, But I don't want to change it everywhere.

Expected Behavior

After upgrading to latest NX version expect imports work as before.

GitHub Repo

No response

Steps to Reproduce

  1. migrate from nx 18 to 19.
  2. used import in 18nx as import Logo from '../../../assets/svg/fintiba-logo.svg';

Nx Report

Node   : 20.3.1
OS     : darwin-arm64
npm    : 9.6.7

nx                 : 19.0.4
@nx/js             : 19.0.4
@nx/jest           : 19.0.4
@nx/linter         : 19.0.4
@nx/eslint         : 19.0.4
@nx/workspace      : 19.0.4
@nx/cypress        : 19.0.4
@nx/devkit         : 19.0.4
@nx/eslint-plugin  : 19.0.4
@nx/expo           : 19.0.4
@nx/node           : 19.0.4
@nx/react          : 19.0.4
@nrwl/tao          : 19.0.4
@nx/web            : 19.0.4
@nx/webpack        : 19.0.4
typescript         : 5.3.3

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@FrozenPandaz FrozenPandaz added the scope: react Issues related to React support for Nx label May 17, 2024
@ndcunningham
Copy link
Contributor

ndcunningham commented Jun 28, 2024

Can you show your webpack config?
Or provide a small repo

Copy link

github-actions bot commented Jul 6, 2024

This issue has been automatically marked as stale because more information has not been provided within 7 days.
It will be closed in 21 days if no information is provided.
If information has been provided, please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Jul 6, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2024
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants