question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't use .svg?include since 2.5.6

See original GitHub issue

Hello,

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:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cyrilwannercommented, Apr 11, 2020

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 the latest tag.

0reactions
cyrilwannercommented, Apr 20, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found