Skip to content

Commit d91b362

Browse files
committed
feat: support direct url from nuxt via ssr
1 parent 9790719 commit d91b362

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/vite-plugin/src/stylesPlugin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ export function stylesPlugin (options: Options): Plugin {
6161
return PLUGIN_VIRTUAL_PREFIX + source.slice(1)
6262
} else if (source.startsWith(`/@id/__x00__${PLUGIN_VIRTUAL_NAME}:`)) {
6363
return PLUGIN_VIRTUAL_PREFIX + source.slice(12)
64+
} else if (source.startsWith(`/${VIRTUAL_MODULE_ID}/`)) {
65+
return source.slice(1)
6466
}
6567

6668
return null

0 commit comments

Comments
 (0)