Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

Make setup syntax sugar support names and other attributes

License

Notifications You must be signed in to change notification settings

vela666/vite-plugin-vue-setup-expand

Repository files navigation

vite-plugin-vue-setup-expand

Make setup syntax sugar support names and other attributes

Install (pnpm or npm or yarn)

pnpm i vite-plugin-vue-setup-expand

Usage

  • Configure in vite.config.js|ts.
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueSetupExpand from 'vite-plugin-vue-setup-expand'

export default defineConfig({
  plugins: [vue(), vueSetupExpand()],
})
  • SFC
<template>
  <div>hello world {{ a }}</div>
</template>

<script setup inheritAttrs lang="ts" name="App" >
  const a = 1
</script>

or

<template>hello world</template>
<script setup inheritAttrs="false" name="LayoutContainer"></script>

Image text

License

MIT

About

Make setup syntax sugar support names and other attributes

Resources

License

Stars

Watchers

Forks

Packages

No packages published