Skip to content

Commit 79f51cf

Browse files
committed
fix: resolve stylesheets when using configFile with optimizeDeps.exclude
fixes #268
1 parent 920c774 commit 79f51cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/vite-plugin/src/stylesPlugin.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ export function stylesPlugin (options: Options): Plugin {
194194
}
195195
} else if (source.startsWith('/plugin-vuetify:')) {
196196
return '\0' + source.slice(1)
197+
} else if (source.startsWith('/@id/__x00__plugin-vuetify:')) {
198+
return '\0' + source.slice(12)
197199
}
198200

199201
return null
@@ -222,7 +224,7 @@ export function stylesPlugin (options: Options): Plugin {
222224
}
223225

224226
if (id.startsWith('\0plugin-vuetify')) {
225-
const file = /^\0plugin-vuetify:(.*)(\?.*)?$/.exec(id)![1]
227+
const file = /^\0plugin-vuetify:(.*?)(\?.*)?$/.exec(id)![1]
226228

227229
return tempFiles.get(file)
228230
}

0 commit comments

Comments
 (0)