Skip to content

Commit

Permalink
fix(css): should not rebase http url (fix: vitejs#12155)
Browse files Browse the repository at this point in the history
  • Loading branch information
sun0day committed Feb 25, 2023
1 parent 3d3788d commit 5f64cc5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const inlineRE = /(?:\?|&)inline\b/
const inlineCSSRE = /(?:\?|&)inline-css\b/
const usedRE = /(?:\?|&)used\b/
const varRE = /^var\(/i
const urlRE = /^(?:https?:)?\/\//i

const cssBundleName = 'style.css'

Expand Down Expand Up @@ -1796,8 +1797,8 @@ function createViteLessPlugin(
this.resolvers = resolvers
this.alias = alias
}
override supports() {
return true
override supports(filename: string) {
return !urlRE.test(filename)
}
override supportsSync() {
return false
Expand Down

0 comments on commit 5f64cc5

Please sign in to comment.