question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The library is replacing more stuff than it should

See original GitHub issue

Overall I like the library, but there is one big bug that makes it unusable. It is replacing stuff that it shouldn’t. For example, I have a flags library that will display country flags when I add the proper CSS classes to an element. But svg-to-vue-component is, somehow, replacing the background-image of that other library, and the result is:

vue_app

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
egoistcommented, Jan 24, 2019
// Use default rule for svg in css files
config.module.rule('svg')
  .issuer(file => file.endsWith('.css')

// Use our loader to handle svg imported by other files
config.module
  .rule('svg-component')
  .test(/\.svg$/)
  .issuer(file => !file.endsWith('.css'))
  .use('vue')
  .loader('vue-loader')
  .end()
  .use('svg-to-vue-component')
  .loader('svg-to-vue-component/loader')

This might work, can you give it a shot?

0reactions
shmartscommented, Jun 19, 2019

Having the same issue, but instead of using the svgs in a .css file, I’m using them in the style tag of .vue files. Any work around that’ll let me keep them in there?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Are libraries still necessary? Advent of technology seems to ...
No device can replace the atmosphere and intimate setting of a library. Libraries can accommodate those who don't have access to computers or ......
Read more >
An awful lot of people use and love their public library, as an ...
Since public libraries are financed with public dollars, Mourdoukoutas argues that replacing them with brick-and-mortar Amazon bookstores would ...
Read more >
Forbes deleted an op-ed arguing that Amazon should replace ...
After much backlash, Forbes appears to have pulled an article saying libraries have no value.
Read more >
Ten Reasons Libraries Are Still Better Than the Internet
The internet is an indispensable and irreplaceable tool for modern living. But it is not a library and will not replace the work...
Read more >
'Twaddle': librarians respond to suggestion Amazon should ...
Librarians are in uproar after an article in Forbes magazine proposed replacing all public libraries in the US with Amazon bookstores.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found