Skip to content

Commit c9eda23

Browse files
authored
chore(css): move environment destructuring after condition check (#19492)
1 parent 797959f commit c9eda23

File tree

1 file changed

+2
-1
lines changed
  • packages/vite/src/node/plugins

1 file changed

+2
-1
lines changed

packages/vite/src/node/plugins/css.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -363,14 +363,15 @@ export function cssPlugin(config: ResolvedConfig): Plugin {
363363
},
364364

365365
async transform(raw, id) {
366-
const { environment } = this
367366
if (
368367
!isCSSRequest(id) ||
369368
commonjsProxyRE.test(id) ||
370369
SPECIAL_QUERY_RE.test(id)
371370
) {
372371
return
373372
}
373+
374+
const { environment } = this
374375
const resolveUrl = (url: string, importer?: string) =>
375376
idResolver(environment, url, importer)
376377

0 commit comments

Comments
 (0)