Version
3.0.0-rc.1
Reproduction link
https://github.com/icehaunter/vue3-setup-bug-repro
Steps to reproduce
- Clone repo, run
npm i and run npm run dev
- Open the
localhost:3000 in browser
- 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
Version
3.0.0-rc.1
Reproduction link
https://github.com/icehaunter/vue3-setup-bug-repro
Steps to reproduce
npm iand runnpm run devlocalhost:3000in 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.