The svg is not outputted when using context
See original GitHub issueMaybe I’m doing something wrong, but:
Having my webpack config:
{
test: /img\/sprite\/.+\.svg$/,
loader: 'svg-sprite'
}
It will work, for a single file:
require('../img/sprite/icon-help.svg')
But I can’t get it to work with context, trying this way:
var files = require.context('../img/sprite', true, /.svg$/)
The svg isn’t added to the body of the page.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
file_get_contents not outputting svg - php - Stack Overflow
I recollect seeing that some servers are not configured to allow file_get_contents (or readfile with URLs) so I would check investigate this ...
Read more >Why text in exported SVG images may not display correctly
Simple explanation : The exported SVG is only designed to be displayed in web pages, we didn't design the output to be editable...
Read more >How would I set the background color of an output SVG? #45
The code I'm using to test this is: ... That's right, there is no 'background' in SVG container - it's always transparent.
Read more >Using SVG | CSS-Tricks
SVG is an image format for vector graphics. It literally means Scalable Vector Graphics. Basically, what you work with in Adobe Illustrator.
Read more >Positions - SVG: Scalable Vector Graphics - MDN Web Docs
In this article, we examine how Scalable Vector Graphics (SVG) represents the positions and sizes of objects within a drawing context, ...
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 FreeTop 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
Top GitHub Comments
This code should be placed in your application
Solve the above problem by installing “@types/webpack”: “^2.1.0”, “@types/webpack-env”: “^1.13.0”,