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 error when resolving relative url(...) inside node_modules #26

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

duyphaphach
Copy link

I caught an error since upgrading to next@12

relative url(...) inside node_modules is resolved incorrectly

Examples:

  • url(../fonts/glyphicons-halflings-regular.eot) => url(../node_modules/bootstrap/node_modules/bootstrap/fonts/glyphicons-halflings-regular.eot)

  • url(./ajax-loader.gif) => url(../node_modules/slick-carousel/node_modules/slick-carousel/slick/ajax-loader.gif)

This PR fix above issue, I tested it with the repo's examples and it runs fine

@elado
Copy link
Owner

elado commented Apr 20, 2022

Can you see if this also happens in CSS/SCSS files in Next.js? If so I believe this is a Next.js bug. I don't think this is this plugin's responsibility to own url() resolving.

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.

None yet

2 participants