0.0.2 • Published 14 days ago

@odinlin/astro-preview v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
14 days ago

Astro Preview

Forked from astro-live-code by Matt Jennings.

Install

npm

npm install @odinlin/astro-preview
import { defineConfig } from 'astro/config'
import preview from '@odinlin/astro-preview'

export default defineConfig({
  integrations: [
    // ... other integrations
    preview({
      // layout: './src/MyLayout.astro',
    }),
  ],
})

Useage

<!-- React case -->
<code client:only="react" src="src/components/ReactDemo.tsx" propA="a" style={{ width:'80%' }}>
  <span>子节点</span>
</code>

<!-- Vue case -->
<code client:only="vue" src="src/components/VueDemo.vue" propA="a" style="width: 80%">
  <span>子节点</span>
</code>
0.0.2

14 days ago

0.0.1

15 days ago