04e1e01f18
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
13 lines
238 B
TypeScript
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
|
|
}
|