Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Ph0tonic committed Apr 21, 2023
1 parent 3a108db commit 6cd2710
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/config/server-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export default defineConfig({
searchForWorkspaceRoot(process.cwd()),
// your custom rules
'/path/to/custom/allow_directory',
'/path/to/custom/allow_file.demo'
'/path/to/custom/allow_file.demo',
],
},
},
Expand Down
6 changes: 5 additions & 1 deletion packages/vite/src/node/server/middlewares/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ export function isFileServingAllowed(

if (server.moduleGraph.safeModulesPath.has(file)) return true

if (server.config.server.fs.allow.some((uri) => isSameFileUri(uri, file) || isParentDirectory(uri, file)))
if (
server.config.server.fs.allow.some(
(uri) => isSameFileUri(uri, file) || isParentDirectory(uri, file),
)
)
return true

return false
Expand Down

0 comments on commit 6cd2710

Please sign in to comment.