Can't use .svg?include since 2.5.6
See original GitHub issueHello,
I’ve came across an issue recently upgrading my depencies. It looks like since version 2.5.6 the raw-loader isn’t loaded properly and during the build I have errors of the likes of, resulting in error 500.
./assets/something.svg?include 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <?xml version="1.0" encoding="utf-8"?>
If I downgrade to 2.5.5 the issue is gone and I can use my svgs as expected.
const Something = require('../assets/something.svg?include')
Hope this will help people coming across this issue until it’s fixed.
Thanks for your hard work.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Embed SVG in SVG? - Stack Overflow
to reference an SVG file you are not given access to the underlying DOM. As such, no, you cannot style elements inside an...
Read more >5 Most Common Problems Faced by SVG Users - Vecta.io
1. Missing fonts · A. Wrongly declared font name · B. You're using <img> or background image to embed your SVG · C....
Read more >Cannot load SVG in React application #1931 - nrwl/nx - GitHub
Utilize an SVG file using the <svg> tag in a React application. Current Behavior. The application fails to compile with nx serve ....
Read more >"svg" | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >Accessible SVGs | CSS-Tricks
Since this SVG does not contain any visible text that describes the graphic, we need to add the alternative text (invisible) by:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That did indeed help, thank you!
I just published a canary version:
2.5.8-canary.1
Can you maybe try this version in your project and tell me if everything works again as expected? If that is the case and I am sure it doesn’t break anything else, I will release it with thelatest
tag.No worries, we all have those weeks.
I’m glad to hear that everything works, thank you again! The fix is now published as a non-canary version in
2.5.8
.