79721783

Date: 2025-07-31 19:57:43
Score: 0.5
Natty:
Report link

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

Reasons:
  • Blacklisted phrase (1): but nothing work
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
Posted by: Basilio German