Skip to content

Commit

Permalink
fix: mayProxy.isPublicFileRequest judgment (#5693)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blacate committed Aug 14, 2020
1 parent 879b815 commit 0146001
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@vue/cli-service/lib/util/prepareProxy.js
Expand Up @@ -49,7 +49,7 @@ module.exports = function prepareProxy (proxy, appPublicFolder) {
// https://github.com/facebook/create-react-app/issues/6720
function mayProxy (pathname) {
const maybePublicPath = path.resolve(appPublicFolder, pathname.slice(1))
const isPublicFileRequest = fs.existsSync(maybePublicPath)
const isPublicFileRequest = fs.existsSync(maybePublicPath) && fs.statSync(maybePublicPath).isFile()
const isWdsEndpointRequest = pathname.startsWith('/sockjs-node') // used by webpackHotDevClient
return !(isPublicFileRequest || isWdsEndpointRequest)
}
Expand Down

0 comments on commit 0146001

Please sign in to comment.