We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9511f1 commit 568a014Copy full SHA for 568a014
1 file changed
packages/vite/src/node/plugins/asset.ts
@@ -210,6 +210,10 @@ export function checkPublicFile(
210
return
211
}
212
const publicFile = path.join(publicDir, cleanUrl(url))
213
+ if (!publicFile.startsWith(publicDir)) {
214
+ // can happen if URL starts with '../'
215
+ return
216
+ }
217
if (fs.existsSync(publicFile)) {
218
return publicFile
219
} else {
0 commit comments