Look at the Nuxt 3 documentation to learn more.
let _webcontainerPromise: Promise<WebContainer>
export async function useWebContainer() {
if (!_webcontainerPromise) _webcontainerPromise = WebContainer.boot()
return await _webcontainerPromise
}
// basic.ts
export default function load() {
// ...
return { files, tree }
}
// index.ts
export const templates = {
basic: () => import('./basic').then((m) => m.default()),
}
// usage
const { files, tree } = await templates.basic()
declare module 'splitpanes' {
import type { Component } from 'vue'
export interface SplitpaneProps {
horizontal: boolean
pushOtherPanes: boolean
dblClickSplitter: boolean
firstSplitter: boolean
}
export interface PaneProps {
size: number | string
minSize: number | string
maxSize: number | string
}
export type Pane = Component<PaneProps>
export const Pane: Pane
export const Splitpanes: Component<SplitpaneProps>
}
- components\PanelEditorFileSystemTree.vue
- components\FileIcon.vue
- components\PanelPreviewClient.client.vue
- templates\basic.layer-playground\plugins\playground.client.ts
- modules\template-loader.ts
- templates\basic.ts
- types\shim.d.ts