nuxt-community / svg-module

Super simple svg loading module for Nuxt.js
MIT License
340 stars 35 forks source link

The CSS in the SVG is not processed when Nuxt is compiled #24

Closed frbuceta closed 4 years ago

frbuceta commented 5 years ago

I am using an SVG with this tag: <defs><style>.cls-1{fill:#fff;fill-rule:evenodd;}</style></defs>

And when I compile the application this tag is empty, the style disappears It is an SVG generated with illustrator

urbgimtam commented 4 years ago

This is a big issue for complex svgs. Anyone has a solution?

Geminii commented 4 years ago

Hi, got the same problem 😞

jsbroks commented 4 years ago

Same issue here. This is a big problem.

jsbroks commented 4 years ago
<img src="~assets/graphics/data.svg?raw" />

Using this method it works correctly

sam3d commented 4 years ago

Please use raw-loader as outlined here to ensure CSS is imported correctly.