-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(plugin-vue): handle circular references in HMR check (#334)
Fixes #325
- Loading branch information
1 parent
0a3b9a5
commit eddcfa8
Showing
6 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<h2 class="hmr-circular-reference">HMR Circular reference</h2> | ||
<p>Click the button then edit this message. The count should be preserved.</p> | ||
<button class="hmr-circular-reference-inc" @click="count++"> | ||
count is {{ count }} | ||
</button> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
import Node from './Node.vue' | ||
defineProps<App.User>() | ||
let foo: number = 0 | ||
const count = ref(foo) | ||
</script> | ||
|
||
<style> | ||
.hmr-circular-reference-inc { | ||
color: red; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// this file will become a TypeScope through option `script.globalTypeFiles` | ||
// which has a circular reference on `TypeScope._ownerScope` (issue 325) | ||
|
||
declare namespace App { | ||
interface User { | ||
name: string | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters