rsnext/packages/next/build/webpack/config/blocks/css/loaders/file-resolve.ts
Tobias Koppers 04e1e01f18
test, fix and document all possible import types for URL imports (#30165)
resolve absolute URLs in CSS when using urlImports
remove `[path]` from static static image output path
replace file-loader with asset module, remove file-loader
2021-10-25 01:54:16 +02:00

13 lines
238 B
TypeScript

export function cssFileResolve(
url: string,
_resourcePath: string,
urlImports: any
) {
if (url.startsWith('/')) {
return false
}
if (!urlImports && /^[a-z][a-z0-9+.-]*:/i.test(url)) {
return false
}
return true
}