Closed romainmenke closed 1 year ago
Can be done with :
function isProcessableURL(uri) {
if (/^(?:[a-z]+:)?\/\//i.test(uri)) {
return false
}
try {
// needs a base to parse properly
const url = new URL(uri, "https://example.com")
if (url.hash) {
return false
}
if (url.search) {
return false
}
} catch {} // Ignore
return true
}
These should be skipped for the same reason that url's with a protocol are skipped.
somewhat related to https://github.com/postcss/postcss-import/issues/536