Skip to content

Commit

Permalink
fix(vite): normalize separate window url when apply base option (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukerSpringtree committed Jun 14, 2024
1 parent 85758c4 commit c0df970
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/vite/src/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ export default function VitePluginVueDevTools(options?: VitePluginVueDevToolsOpt
const urls = server.resolvedUrls!
const keys = normalizeComboKeyPrint('option-shift-d')
_printUrls()
for (const url of urls.local)
console.log(` ${green('➜')} ${bold('Vue DevTools')}: ${green(`Open ${colorUrl(`${url}__devtools__/`)} as a separate window`)}`)
for (const url of urls.local) {
const devtoolsUrl = url.endsWith('/') ? `${url}__devtools__/` : `${url}/__devtools__/`
console.log(` ${green('➜')} ${bold('Vue DevTools')}: ${green(`Open ${colorUrl(`${devtoolsUrl}`)} as a separate window`)}`)
}
console.log(` ${green('➜')} ${bold('Vue DevTools')}: ${green(`Press ${yellow(keys)} in App to toggle the Vue DevTools`)}\n`)
}
}
Expand Down

0 comments on commit c0df970

Please sign in to comment.