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

[nextjs] Fix path resolution #310

Merged
merged 1 commit into from
Nov 11, 2024
Merged

[nextjs] Fix path resolution #310

merged 1 commit into from
Nov 11, 2024

Conversation

brijeshb42
Copy link
Contributor

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

@brijeshb42 brijeshb42 added bug 🐛 Something doesn't work nextjs webpack labels Nov 9, 2024
@brijeshb42 brijeshb42 force-pushed the fix/171 branch 4 times, most recently from a6085c8 to cd15629 Compare November 10, 2024 08:19
Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 one minor suggestion

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.
@brijeshb42 brijeshb42 merged commit 85ea2f6 into mui:master Nov 11, 2024
12 checks passed
@brijeshb42 brijeshb42 deleted the fix/171 branch November 11, 2024 10:49
@valleywood
Copy link

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

@brijeshb42
Copy link
Contributor Author

Published new version 0.0.27.

@valleywood
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work nextjs webpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

withPigment causes tsconfig compiler path option to not work
3 participants