Skip to content

Commit c6cb498

Browse files
committed
feat(nuxt): add nuxt playground
1 parent d364f9e commit c6cb498

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

playground/app.vue

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<script setup lang="ts">
2+
const [toggleable, toggle] = useToggle()
3+
</script>
4+
5+
<template>
6+
<div>
7+
<input type="checkbox" :value="toggleable ? 'checked' : 'unchecked'" @change="toggle" />
8+
Current value is: {{ toggleable }}
9+
</div>
10+
</template>

playground/nuxt.config.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { resolve } from 'path'
2+
import { defineNuxtConfig } from 'nuxt3'
3+
import MyModule from '../src/nuxt/module'
4+
5+
export default defineNuxtConfig({
6+
// Alias for local development
7+
alias: {
8+
'vue-composable-starter': resolve(__dirname, '../src/index.ts')
9+
},
10+
// Import module from src
11+
modules: [MyModule]
12+
})

playground/tsconfig.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "./.nuxt/tsconfig.json",
3+
"compilerOptions": {}
4+
}

0 commit comments

Comments
 (0)