stackblitz / core

Online IDE powered by Visual Studio Code ⚡️
https://stackblitz.com
MIT License
10.22k stars 886 forks source link

Support for Vue 3's <script setup> #1308

Open tony19 opened 3 years ago

tony19 commented 3 years ago

The Vue 3 starter does not support the <script setup> block, and renders an error message:

Script missing

Example usage of <script setup>:

<script setup>
import { ref } from 'vue'

const msg = ref('Hello World!')
</script>

<template>
  <h1>{{ msg }}</h1>
  <input v-model="msg">
</template>

StackBlitz demo

For reference, here's a working Vue SFC playground demo.

A workaround is to use a Node starter with Vite installed.

EricSimons commented 3 years ago

Thanks for the repro @tony19! We'll take a look at this and get a fix out asap. Will circle back here when it's live 👍

RawZ06 commented 3 years ago

Hi, this feature was beta experimental when this issue was created. Today with Vue 3.2 released as the few days, this syntax is integrated in Vue.

But stackblitz renders the same error message.

With web container, I advise, to wait, using vite !

Bobakanoosh commented 2 years ago

Any updates on this?

chrisshroba commented 2 years ago

StackBlitz seems to be the only online code sandbox that supports multiple .vue files (JSFiddle doesn't allow .vue, CodePen supports .vue but only lets you create one file on the free plan, repl.it is kind of a mess to configure for a simple Vue project).

It would be awesome if it could support Githubissues.

  • Githubissues is a development platform for aggregating issues.