mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
_fix(webpack): remove absolute wanrning messge in css-loader (#8629)
This commit is contained in:
parent
1405968d89
commit
e2e604ea3b
@ -1,5 +1,4 @@
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
import consola from 'consola'
|
|
||||||
import ExtractCssChunksPlugin from 'extract-css-chunks-webpack-plugin'
|
import ExtractCssChunksPlugin from 'extract-css-chunks-webpack-plugin'
|
||||||
|
|
||||||
import { wrapArray } from '@nuxt/utils'
|
import { wrapArray } from '@nuxt/utils'
|
||||||
@ -36,12 +35,7 @@ export default class StyleLoader {
|
|||||||
|
|
||||||
isUrlResolvingEnabled (url, resourcePath) {
|
isUrlResolvingEnabled (url, resourcePath) {
|
||||||
// Ignore absolute URLs, it will be handled by serve-static.
|
// Ignore absolute URLs, it will be handled by serve-static.
|
||||||
if (url.startsWith('/')) {
|
return !url.startsWith('/')
|
||||||
consola.warn(`Please use relative path or alias path instead of absolute path ${url}`)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
normalize (loaders) {
|
normalize (loaders) {
|
||||||
|
Loading…
Reference in New Issue
Block a user