Skip to content

Commit f0ac437

Browse files
hi-ogawasapphi-red
andauthored
chore: comment
Co-authored-by: 翠 / green <[email protected]>
1 parent 76b96f0 commit f0ac437

File tree

1 file changed

+5
-0
lines changed
  • packages/vite/src/node/plugins

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,6 +2376,11 @@ const makeModernScssWorker = (
23762376
const resolved = await internalCanonicalize(url, importer)
23772377
if (
23782378
resolved &&
2379+
// only limit to these extensions because:
2380+
// - for the `@import`/`@use`s written in file loaded by `load` function,
2381+
// the `canonicalize` function of that `importer` is called first
2382+
// - the `load` function of an importer is only called for the importer
2383+
// that returned a non-null result from its `canonicalize` function
23792384
(resolved.endsWith('.css') ||
23802385
resolved.endsWith('.scss') ||
23812386
resolved.endsWith('.sass'))

0 commit comments

Comments
 (0)