Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue-svg-loader breaks down SVG support in stylesheets #534

Closed
JanssenBrm opened this issue Jan 13, 2025 · 3 comments
Closed

vue-svg-loader breaks down SVG support in stylesheets #534

JanssenBrm opened this issue Jan 13, 2025 · 3 comments
Assignees
Labels
help wanted Extra attention is needed
Milestone

Comments

@JanssenBrm
Copy link
Contributor

After adding the vue-svg-loader module to the project (see 852af74#diff-1d62a367f02f5c91000e35c82b0086fae3246eca3942f9034c058b16a3780ec2R43-R53), it appears that the application is no longer loading SVGs that are configured as background-image in the stylesheets.

Expected Behavior

SVGs should be properly loaded and displayed as background-image elements in the stylesheets, just like before the module was added.

Actual Behavior

SVGs are not showing when configured as background-image in the stylesheets.

JanssenBrm added a commit to JanssenBrm/stac-browser that referenced this issue Jan 13, 2025
@JanssenBrm
Copy link
Contributor Author

I've added a reference to a commit that allows the reproduction of the issue. By uncommenting the following code, the cloud icon, next to every title, disappears.

    const svgRule = webpackConfig.module.rule('svg');
    svgRule.uses.clear();
    svgRule.delete('type');
    svgRule.delete('generator');
    svgRule
      .use('vue-loader')
      .loader('vue-loader')
      .end()
      .use("./vue-svg-loader")
      .loader("./vue-svg-loader");

Before

image

After uncommenting code

image

@m-mohr m-mohr added this to the 3.3.0 milestone Jan 13, 2025
@m-mohr
Copy link
Collaborator

m-mohr commented Jan 13, 2025

Ah, shoot. The SVG loading was a bit hacky from the beginning, but I also couldn't find another reliably way of doing it. Anyone has an idea?

@m-mohr m-mohr added bug help wanted Extra attention is needed labels Jan 13, 2025
@m-mohr m-mohr removed the bug label Jan 22, 2025
@m-mohr m-mohr self-assigned this Jan 22, 2025
@m-mohr
Copy link
Collaborator

m-mohr commented Jan 22, 2025

This has been fixed, thanks for the report.

@m-mohr m-mohr closed this as completed Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants