Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/plugin-vue/src/handleHotUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ function isEqualAst(prev?: t.Statement[], next?: t.Statement[]): boolean {
}

function hasScriptChanged(prev: SFCDescriptor, next: SFCDescriptor): boolean {
// @ts-expect-error TODO remove when 3.6 is out
if (prev.vapor !== next.vapor) return true
Comment on lines +299 to +300
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new vapor mode detection logic lacks test coverage. While the playground has HMR tests for various scenarios, there are no tests verifying that the component reloads correctly when switching between vapor and vdom modes. Consider adding a test case that validates this behavior by toggling a component between vapor and non-vapor modes and verifying that HMR triggers a full reload rather than just a hot update.

Copilot uses AI. Check for mistakes.

// check for scriptAst/scriptSetupAst changes
// note that the next ast is not available yet, so we need to trigger parsing
const prevScript = getResolvedScript(prev, false)
Expand Down
Loading