vite-plugin-vue-support-setup-name
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

vite-plugin-vue-support-setup-name

使 vue script setup 语法支持 name 和inheritAttrs 属性,根据 name 和inheritAttrs 自动转换。

特性

  • 支持 name
  • 支持 inheritAttrs

安装

pnpm add -D vite-plugin-vue-support-setup-name

使用

  • In vite.config.ts:
import { defineConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'
import SupportSetupName from 'vite-plugin-vue-support-setup-name'

export default defineConfig({
  plugins: [vue(), SupportSetupName()],
})
  • In Vue file:
<template>
  <div>vite-plugin-vue-support-setup-name</div>
</template>

<script lang="ts" setup name="MyName" inheritAttrs="false">

</script>

更多

https://github.com/AnthonyJu/npm-packages/tree/main/packages/vite-plugin-vue-support-setup-name

Package Sidebar

Install

npm i vite-plugin-vue-support-setup-name

Weekly Downloads

0

Version

0.3.2

License

MIT

Unpacked Size

5.58 kB

Total Files

5

Last publish

Collaborators

  • anthony-ju