Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vue template): support script setup template #648

Merged
merged 2 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion sandpack-client/.bundler
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Manually generated file to trigger new releases based on the bundler changes.
// The following value is the commit hash from codesandbox-client
560d0f63c40a5adec235138c1e4509f42c980aeb
ebf846d29f45cae489d4c6525c41fd96e90cbbdc
42 changes: 21 additions & 21 deletions sandpack-react/src/templates/vue3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@
export const VUE_TEMPLATE_3 = {
files: {
"/src/App.vue": {
code: `<template>
<main id="app">
<h1>{{ helloWorld }}</h1>
</main>
</template>

<script>
code: `<script setup>
import { ref } from "vue";
export default {
name: "App",
setup() {
const helloWorld = ref("Hello World");
return { helloWorld };
}
};

const msg = ref("world");
</script>

<template>
<h1>Hello {{ msg }}</h1>
</template>

<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
body {
font-family: sans-serif;
-webkit-font-smoothing: auto;
-moz-font-smoothing: auto;
-moz-osx-font-smoothing: grayscale;
font-smoothing: auto;
text-rendering: optimizeLegibility;
font-smooth: always;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
}

h1 {
font-size: 1.5rem;
}
</style>
`,
Expand Down