npm

vite-plugin-vue-template-tag
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

vite-plugin-vue-template-tag

支持.vue文件根标签添加tag等属性,解析成新的子元素并包裹旧的子元素

EXAMPLE

  1. install
npm install -D vite-plugin-vue-template-tag
  1. config
// vite.config.ts
...
import templateTag from "vite-plugin-vue-template-tag";
...
  plugins: [
    vue(),
    templateTag()
  ],
...
  1. IN
<template tag="div" class="root" lang="html" @click="(ev) => {ev.preventDefault(); }" hide :isHidden="false">
  <h1>Hello World !</h1>

</template>
  1. OUT
<template>
<div class="root" @click="(ev) => { ev.preventDefault(); }" :isHidden="false" hide>
  <h1>Hello World !</h1>

</div>
</template>

Package Sidebar

Install

npm i vite-plugin-vue-template-tag

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

7.49 kB

Total Files

6

Last publish

Collaborators

  • wscloud