Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Fix error when resolving relative url(...) inside node_modules#26

Open
duyphaphach wants to merge 4 commits intoelado:mainfrom
duyphaphach:main
Open

Fix error when resolving relative url(...) inside node_modules#26
duyphaphach wants to merge 4 commits intoelado:mainfrom
duyphaphach:main

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants