vite-plugin-vue-setup-extend-plus

Extending the vue script setup syntactic sugar, by vite-plugin-vue-setup-extend
143,328 31
Install
npm install vite-plugin-vue-setup-extend-plus
Latest Version:0.1.0
License:MIT
Last Updated:Jun 9, 2022
Links: GitHub  ·  npm
Maintainer: chenxch

Expansion based on vite-plugin-vue-setup-extend

vite-plugin-vue-setup-extend-plus

Make the vue script setup syntax support the name attribute

Iterative updates are made in unplugin-vue-setup-extend-plus during the later period.

CHANGELOG

[0.1.0]

  • Automatically convert based on name and inheritAttrs

Feature

  • support name
  • support inheritAttrs
  • precise breakpoints

Install (yarn or npm)

node version: >=12.0.0

vite version: >=2.0.0

yarn add vite-plugin-vue-setup-extend-plus -D

or

npm i vite-plugin-vue-setup-extend-plus -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 vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'

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

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

Sample project

Vben Admin

License

MIT

Related Packages

@yuntian001/vue-setup-extend

Make the vue script setup syntax support the attribute

1,017 1
@unvuetify/vite-styles-plugin

Vuetify Vite plugin for styles

5,683 21
unplugin-vue-setup-extend-plus

Extending the vue script setup syntactic sugar

412,709 44
unplugin-vue-setup-extend

vue setup extend options name

6,273 6
vite-plugin-vue2

Vite plugin for Vue2

1,474,659 618

Version History

Version Released License
0.1.0 MIT
0.0.2 MIT
0.0.1 MIT