Skip to content

Commit dc9218c

Browse files
authored
feat: move auth storage to global user directory (#225)
1 parent 693e025 commit dc9218c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/node/context-internal.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { DevToolsNodeContext } from '@vitejs/devtools-kit'
22
import type { SharedState } from '@vitejs/devtools-kit/utils/shared-state'
3+
import { homedir } from 'node:os'
34
import { join } from 'pathe'
45
import { createStorage } from './storage'
56

@@ -25,7 +26,7 @@ export function getInternalContext(context: DevToolsNodeContext): DevToolsIntern
2526
const internalContext: DevToolsInternalContext = {
2627
storage: {
2728
auth: createStorage<InternalAnonymousAuthStorage>({
28-
filepath: join(context.workspaceRoot, 'node_modules/.vite/devtools/auth.json'),
29+
filepath: join(homedir(), '.vite/devtools/auth.json'),
2930
initialValue: {
3031
trusted: {},
3132
},

0 commit comments

Comments
 (0)