DEV Community

Discussion on: Webpack 5 - Asset Modules

Collapse
 
rafarochas91 profile image
Rafael Rocha

Hi, really good article!
I'm having an issue with data URI (Safari doesn't really like them) and svg sprites. How would I avoid inlining as a Data URI and serve the svg from the static folder by default?
In this case I'm using the Copy plugin for Webpack to place the svgs from an npm package in the node_modules into the assetFileModuleName path.
Any ideas?
Thanks in advance!

Collapse
 
charlieurt profile image
Charlie Urt

Has you try to set the type as 'type: 'asset/resource'?