You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open in editor the file src/components/HelloWorld.vue
Edit <script setup> block adding and removing an enter multiple times, saving each time. Editing template by changing letters also works, but reproduces much slower.
What is expected?
Module is recompiled correctly every time
What is actually happening?
An error occurs in console:
[vite] SFC <script setup> compilation error:
/home/icehaunter/work/sltech/statecraft/src/components/HelloWorld.vue
end is out of bounds
An error occurs in the browser:
[Vue warn]: Component is missing template or render function.
at <HelloWorld msg="Hello Vue 3.0 Vite" >
at <App>
I basically initialized Vite application, switched to TypeScript and decided to try out the new <script setup> syntax. As far as I can tell, the error lies in Vue compiler and not in Vite, because Vite just prints out an error.
I could not reproduce the error with Vue CLI environment because I couldn't get it to process the <script setup> block at all.
Node version: 14.5.0
Typescript: 3.9.7
Vite: 1.0.0-rc.1
The text was updated successfully, but these errors were encountered:
I tried recording a reproduction video. Here I repeatedly add and remove symbols from the line, saving the file each time, as you can tell from "reload" lines. I do not know whether the fact that component goes missing multiple times in the browser is the same bug or an error with Vite.
I made a better reproduction demonstration, where editing <script setup> block causes many more errors and they appear much quicker. Am just adding/removing whitespace here.
Version
3.0.0-rc.1
Reproduction link
https://github.com/icehaunter/vue3-setup-bug-repro
Steps to reproduce
npm i
and runnpm run dev
localhost:3000
in browsersrc/components/HelloWorld.vue
<script setup>
block adding and removing an enter multiple times, saving each time. Editing template by changing letters also works, but reproduces much slower.What is expected?
Module is recompiled correctly every time
What is actually happening?
An error occurs in console:
An error occurs in the browser:
I basically initialized Vite application, switched to TypeScript and decided to try out the new
<script setup>
syntax. As far as I can tell, the error lies in Vue compiler and not in Vite, because Vite just prints out an error.I could not reproduce the error with Vue CLI environment because I couldn't get it to process the
<script setup>
block at all.The text was updated successfully, but these errors were encountered: