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

Resolving url() with CSS Modules #146

Closed
silvenon opened this issue Sep 1, 2023 · 2 comments
Closed

Resolving url() with CSS Modules #146

silvenon opened this issue Sep 1, 2023 · 2 comments

Comments

@silvenon
Copy link

silvenon commented Sep 1, 2023

Hey! I love your plugin and the dedication you're putting into it ❤️

I carefully read the docs, related issues, test fixtures, but I wasn't able to find the solution for my problem.

The repro is here: https://github.com/silvenon/repro/tree/5a2567b78dae490ea38d52b66a027fe4c71c5f23 (if you're going to clone it, notice that the branch is esbuild-sass-modules-url, not the default master)

My use case is resolving url() in (S)CSS Modules. The build succeeds if I remove postcssModules and even precompile, but I haven't managed to get the url() working with postcssModules.

Any ideas? 🙏

glromeo added a commit that referenced this issue Sep 1, 2023
@glromeo
Copy link
Owner

glromeo commented Sep 1, 2023

Thank you for giving me the context to look at this issue with ease!
I ran your repro and the error I was getting pointed me to an oversight I did when implementing
the css-chunks for which resolveDir was missing and therefore esbuild wasn't able to
resolve the relative url of your svg.
I fixed that and your build seems OK. Please try v2.14.0 and feel free to reopen this issue if I
missed something.

@glromeo glromeo closed this as completed Sep 1, 2023
@silvenon
Copy link
Author

silvenon commented Sep 3, 2023

Wow, thanks for such a speedy rescue, it works! ❤️

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

No branches or pull requests

2 participants