rsnext/packages/next/build/webpack/config/blocks/css/loaders/file-resolve.ts
JJ Kasper ec2ffb4244
Handle css-loader file resolving change (#17724)
This is a follow-up to https://github.com/vercel/next.js/pull/16973 which adds handling for the breaking change in the latest version of css-loader that causes unresolved file references in `url` or `import` to cause the build to fail. This fixes it by adding our own resolve checking and when it fails disabling the `css-loader`'s handling of it. 

Fixes: https://github.com/vercel/next.js/issues/17701
2020-10-08 18:45:39 +00:00

6 lines
135 B
TypeScript

export function cssFileResolve(url: string, _resourcePath: string) {
if (url.startsWith('/')) {
return false
}
return true
}