Skip to content

Commit

Permalink
chore(css): move environment destructuring after condition check (#19492
Browse files Browse the repository at this point in the history
)
  • Loading branch information
OnlyWick authored Feb 27, 2025
1 parent 797959f commit c9eda23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,14 +363,15 @@ export function cssPlugin(config: ResolvedConfig): Plugin {
},

async transform(raw, id) {
const { environment } = this
if (
!isCSSRequest(id) ||
commonjsProxyRE.test(id) ||
SPECIAL_QUERY_RE.test(id)
) {
return
}

const { environment } = this
const resolveUrl = (url: string, importer?: string) =>
idResolver(environment, url, importer)

Expand Down

0 comments on commit c9eda23

Please sign in to comment.