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

babel-preset: handles relative paths as assets #313

Open
layershifter opened this issue Jan 10, 2023 · 0 comments · May be fixed by #414
Open

babel-preset: handles relative paths as assets #313

layershifter opened this issue Jan 10, 2023 · 0 comments · May be fixed by #414
Labels
🐞 bug Something isn't working

Comments

@layershifter
Copy link
Member

In the fixture below assetWithHash contains a url() that uses relative path (not imported path).

export const useStyles = makeStyles({
rootA: { backgroundImage: `url(${blank})` },
rootB: { backgroundImage: `url("${blankDuplicate}")` },
rootC: { backgroundImage: `url(${empty})` },
assetWithHash: { filter: 'url(./a.svg#a)' },
});

⬇️⬇️⬇️

`.fv04sme{-webkit-filter:url(${_asset3}#a);filter:url(${_asset3}#a);}`,

url() there should not be transformed there, but it gets 💥
It seems that without migration to Linaria v4 (#184) that uses absolute paths it will be impossible to handle this scenario properly.

@layershifter layershifter added the 🐞 bug Something isn't working label Jan 10, 2023
@layershifter layershifter linked a pull request Jul 31, 2023 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
1 participant