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

fix(vite): css url() resolve error #1263

Merged
merged 3 commits into from
Jul 5, 2023
Merged

fix(vite): css url() resolve error #1263

merged 3 commits into from
Jul 5, 2023

Conversation

wmzy
Copy link
Contributor

@wmzy wmzy commented Jun 25, 2023

Motivation

Relative path in css like: url(../assets/img.png) has been resolved error. This pr fixed it.

Summary

Vite support relative path in css like: url(../assets/img.png).

The cssId was previously resolved to cssId. Which may cause ../assets/img.png resolve error.

So we should resolve the cssId to a file which is same directory of source file.

Test plan

@changeset-bot
Copy link

changeset-bot bot commented Jun 25, 2023

🦋 Changeset detected

Latest commit: 6aaf275

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@linaria/vite Patch
@linaria/rollup Patch
vpssr-linaria-solid-example Patch
linaria Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Anber
Copy link
Collaborator

Anber commented Jul 3, 2023

Hi @wmzy!
Something went wrong with CI. Could you please check it?

@wmzy
Copy link
Contributor Author

wmzy commented Jul 5, 2023

Hi @Anber , problem has been resolved.

By the way, do you consider to upgrade the pnpm lockfile version to 6 so that contributors need not downgrade their pnpm version.

@Anber Anber merged commit a6a29da into callstack:master Jul 5, 2023
4 checks passed
@Anber
Copy link
Collaborator

Anber commented Jul 5, 2023

Hi @wmzy!
Yeah, it's a good idea. Thank you!

MrFoxPro added a commit to MrFoxPro/linaria that referenced this pull request Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants