_fix(webpack): remove absolute wanrning messge in css-loader (#8629)

This commit is contained in:
Xin Du (Clark) 2021-01-12 20:25:37 +00:00 committed by GitHub
parent 1405968d89
commit e2e604ea3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,4 @@
import path from 'path'
import consola from 'consola'
import ExtractCssChunksPlugin from 'extract-css-chunks-webpack-plugin'
import { wrapArray } from '@nuxt/utils'
@ -36,12 +35,7 @@ export default class StyleLoader {
isUrlResolvingEnabled (url, resourcePath) {
// Ignore absolute URLs, it will be handled by serve-static.
if (url.startsWith('/')) {
consola.warn(`Please use relative path or alias path instead of absolute path ${url}`)
return false
}
return true
return !url.startsWith('/')
}
normalize (loaders) {