I'm building a Vue Quasar app and nothing with raw-loader worked until I did:
import myIcon from "!!raw-loader!assets/icons/my_icon.svg";
I tried doing the following in my quasar config to override the loaders:
cfg.module.rules.push({
test: /\.svg$/,
resourceQuery: /raw/,
use: "raw-loader",
type: "javascript/auto",
});
And loading with ?raw in the end but nothing worked. Seems other loaders take priority. The config code above is not necessary with the !!raw-loader!
solution.
I can now inline include SVGs and use the CSS advantages.
I know this is an old question but I could not find an answer anywhere but on raw-loaders documentation