next-with-less icon indicating copy to clipboard operation
next-with-less copied to clipboard

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

Open duyphaphach opened this issue 2 years ago • 1 comments

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

duyphaphach avatar Apr 20 '22 11:04 duyphaphach

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.

elado avatar Apr 20 '22 20:04 elado