1.0.4 • Published 2 years ago

vite-plugin-setup-custom-name v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

vite-plugin-setup-custom-name

Make the vue script setup syntax support the custom name attribute

Install (yarn or npm)

node version: >=12.0.0

vite version: >=2.0.0

yarn add vite-plugin-setup-custom-name -D

or

npm i vite-plugin-setup-custom-name -D

Usage

  • Config plugin in vite.config.ts. In this way, the required functions can be introduced as needed
import { defineConfig, Plugin } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueSetupCustomName from 'vite-plugin-setup-custom-name'

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

<script lang="ts" setup name="App" componentName="custom-name">

</script>

License

MIT

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago