Skip to content

Commit

Permalink
chore: update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzhang1030 committed Jul 22, 2024
1 parent 2da3253 commit dbf7a54
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vite/src/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ export default function VitePluginVueDevTools(options?: VitePluginVueDevToolsOpt
if (importee === devtoolsOptionsImportee) {
return resolvedDevtoolsOptions
}
// Why use query instead of vite virtual module on devtools resource?
// Devtools resource will import `@vue/devtools-core` and other packages, which vite cannot analysis correctly on virtual module.
// So we should use absolute path + `query` to mark the resource as devtools resource.
else if (importee.startsWith('virtual:vue-devtools-path:')) {
const resolved = importee.replace('virtual:vue-devtools-path:', `${vueDevtoolsPath}/`)
return `${resolved}${devtoolsNextResourceSymbol}`
Expand Down

0 comments on commit dbf7a54

Please sign in to comment.