-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vite 运行时报错 #1480
Comments
Try creating a export default {
server: {
fs: {
allow: ['..']
}
}
} |
解决了吗 |
Closing due to inactivity |
Hi guys, same issue here. This problem is caused by Fortunately, the vite config manually built will be merged with the user specified config. So-called user specified config is passed to The
@brc-dd 's solution will never work as expected. Wherever we put the The only correct and temporary method is find our import { cwd } from 'node:process'
import { searchForWorkspaceRoot } from 'vite'
import { defineConfig } from 'vitepress'
const vitePressConfig = defineConfig({
vite: {
server: {
fs: {
allow: [searchForWorkspaceRoot(cwd())]
}
}
}
// ...yourCustomConfig
})
export vitePressConfig Congratulations! Works well 🎉 ReferencesFinally, the code here in VitePress should be fixed. |
Describe the bug
The request url "/Users/allen/Desktop/lingo_code/turborepo/node_modules/.pnpm/registry.npmmirror.com+@docsearch+css@3.2.1/node_modules/@docsearch/css/dist/style.css" is outside of Vite serving allow list.
Reproduction
无
Expected behavior
正常运行
System Info
The request url "/Users/allen/Desktop/lingo_code/turborepo/node_modules/.pnpm/registry.npmmirror.com+@docsearch+css@3.2.1/node_modules/@docsearch/css/dist/style.css" is outside of Vite serving allow list.
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: