File tree Expand file tree Collapse file tree 3 files changed +2
-20
lines changed
Expand file tree Collapse file tree 3 files changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export async function createWsServer(options: CreateWsServerOptions) {
3434 const context = options . context
3535 const contextInternal = getInternalContext ( context )
3636
37- const isClientAuthDisabled = context . mode === 'build' || context . viteConfig . devtools ?. clientAuth === false || process . env . VITE_DEVTOOLS_DISABLE_CLIENT_AUTH === 'true'
37+ const isClientAuthDisabled = context . mode === 'build' || context . viteConfig . devtools ?. config ?. clientAuth === false || process . env . VITE_DEVTOOLS_DISABLE_CLIENT_AUTH === 'true'
3838 if ( isClientAuthDisabled ) {
3939 console . warn ( '[Vite DevTools] Client authentication is disabled. Any browser can connect to the devtools and access to your server and filesystem.' )
4040 }
Original file line number Diff line number Diff line change @@ -6,22 +6,6 @@ declare module 'vite' {
66 interface Plugin {
77 devtools ?: DevToolsPluginOptions
88 }
9- interface UserConfig {
10- devtools ?: ViteConfigDevtoolsOptions
11- }
12- }
13-
14- export interface ViteConfigDevtoolsOptions {
15- /**
16- * Disable client authentication.
17- *
18- * Beware that if you disable client authentication,
19- * any browsers can connect to the devtools and access to your server and filesystem.
20- * (including other devices, if you open server `host` option to LAN or WAN)
21- *
22- * @default true
23- */
24- clientAuth ?: boolean
259}
2610
2711export interface PluginWithDevTools extends Plugin {
Original file line number Diff line number Diff line change @@ -89,9 +89,6 @@ export default defineNuxtConfig({
8989 vite : {
9090 base : BASE ,
9191 build : {
92- rolldownOptions : {
93- devtools : { } ,
94- } ,
9592 minify : NUXT_DEBUG_BUILD ? false : undefined ,
9693 cssMinify : false ,
9794 } ,
@@ -132,6 +129,7 @@ export default defineNuxtConfig({
132129 clientAuth : false ,
133130 } ,
134131 plugins : [
132+ // @ts -expect-error skip type check
135133 NUXT_DEBUG_BUILD ? Inspect ( { build : true } ) : null ,
136134 ] ,
137135 } ,
You can’t perform that action at this time.
0 commit comments