Skip to content

Commit 0146001

Browse files
authored
fix: mayProxy.isPublicFileRequest judgment (#5693)
1 parent 879b815 commit 0146001

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@vue/cli-service/lib/util/prepareProxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module.exports = function prepareProxy (proxy, appPublicFolder) {
4949
// https://github.com/facebook/create-react-app/issues/6720
5050
function mayProxy (pathname) {
5151
const maybePublicPath = path.resolve(appPublicFolder, pathname.slice(1))
52-
const isPublicFileRequest = fs.existsSync(maybePublicPath)
52+
const isPublicFileRequest = fs.existsSync(maybePublicPath) && fs.statSync(maybePublicPath).isFile()
5353
const isWdsEndpointRequest = pathname.startsWith('/sockjs-node') // used by webpackHotDevClient
5454
return !(isPublicFileRequest || isWdsEndpointRequest)
5555
}

0 commit comments

Comments
 (0)