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

scss background-image: url() with svg data #2993

Closed
6 tasks done
XpamAmAdEuS opened this issue Apr 15, 2021 · 3 comments · May be fixed by slumericanBx/vite#1
Closed
6 tasks done

scss background-image: url() with svg data #2993

XpamAmAdEuS opened this issue Apr 15, 2021 · 3 comments · May be fixed by slumericanBx/vite#1

Comments

@XpamAmAdEuS
Copy link

XpamAmAdEuS commented Apr 15, 2021

moving from webpack with really big project and have solve all problems in one day but this one seems like a bug.
Have try all 2.0 + versions.

In scss file have this.

$bg-light: "data:image/svg+xml;base64, "BIGDATA ++++";

.className {
      background-image: url($bg-light);
      background-size: 300px;
    }


[plugin:vite:css] expected ")".

213 │       background-image: url(../../../assets/scss//$bg-light);
       │                                            ^

Same project working with webpack.

Before submitting the issue, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Provide a description in this issue that describes the bug.
  • Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
@github-actions
Copy link

Hello @XpamAmAdEuS. Please provide a online reproduction by codesandbox or a minimal GitHub repository. Issues labeled by need reproduction will be closed if no activities in 3 days.

@XpamAmAdEuS
Copy link
Author

here example
https://codesandbox.io/s/vitetest-pilig?file=/src/components/HelloWorld.vue
importing scss using alias only in vue files get error.
if import without it working nice.
plz check

@sapphi-red
Copy link
Member

Closing as it is organized into #7651.

@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants