Hi, I've tried v4.0 and webpack2 and I'm having an issue with webpack-dev-sever not serving svg sprite over ajax request (404).
This is string from my app
const svg = {
path: '/sprite/*.svg',
name: '/assets/[hash].sprite.svg'
};
require('webpack-svgstore-plugin/src/helpers/svgxhr')(svg);
This is the single string about the sprite file in webpack-dev-server output
/assets/1490001270004.sprite.svg 12.4 kB [emitted]
console.log(svg.filename) in runtime returns
//assets/1490001270004.sprite.svg
but the actual ajax request for the file always return 404
Cannot GET /assets/1490001270004.sprite.svg
If I run webpack build, then webpack does generate and save sprite to fs no problems, so the problem I have only related to webpack-dev-server and serving the svg from memory.
Any thoughts on how to debug such a behavior?
Thanks!
Hi, I've tried v4.0 and webpack2 and I'm having an issue with webpack-dev-sever not serving svg sprite over ajax request (404).
This is string from my app const svg = { path: '/sprite/*.svg', name: '/assets/[hash].sprite.svg' }; require('webpack-svgstore-plugin/src/helpers/svgxhr')(svg);
This is the single string about the sprite file in webpack-dev-server output /assets/1490001270004.sprite.svg 12.4 kB [emitted]
console.log(svg.filename) in runtime returns //assets/1490001270004.sprite.svg
but the actual ajax request for the file always return 404 Cannot GET /assets/1490001270004.sprite.svg
If I run webpack build, then webpack does generate and save sprite to fs no problems, so the problem I have only related to webpack-dev-server and serving the svg from memory.
Any thoughts on how to debug such a behavior? Thanks!