mui / pigment-css

Pigment CSS is a zero-runtime CSS-in-JS library that extracts the colocated styles to their own CSS files at build time.
MIT License
820 stars 39 forks source link

[nextjs] Fix path resolution #310

Closed brijeshb42 closed 1 week ago

brijeshb42 commented 1 week ago

This reverts the previous "fix" and uses the newly available loaderContext from unplugin to do path resolution. Previous solution was "hacky" in a sense since at that time, Unplugin did not expose loader's context. So we had to do things manually which did not work reliably. Now that we have "loaderContext" data, it's straighforward to just call loaderContext.resolve() with the path and this works as expected.

Tested on our docs and user submitted repro repository.

Fixes #171

valleywood commented 1 week ago

@brijeshb42 How does the release process look like (when will there be a 0.0.27 patch release)?

brijeshb42 commented 1 week ago

Published new version 0.0.27.

valleywood commented 1 week ago

Thanks @brijeshb42 can confirm all my aliases working again with version 0.0.27 👍