1.0.12 • Published 2 years ago

vite-plugin-vue3-bem v1.0.12

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

vue3-bem vite plugin

Making vue3-bem run in vite.

Feature

  • remove import vue3-bem

Use

It is only written with 'script setup', set attr bem-block as block.

use it as follow.

setting in vite.config.js.

// vite.config.js
import ViteVue3Bem from "vite-plugin-vue3-bem";

plugins:[
    ViteVue3Bem()
]

in SFC

// like it
<template> 
    <div class="tip">
        <div :class="bem('wrap')"></div>
    </div>
</template>

<script lang="ts" bem-block="tip">
</script>
// equivalent to
<template> 
    <div class="tip">
        <div :class="bem('wrap')"></div>
    </div>
</template>

<script lang="ts" bem-block="tip">
import useBem from "./useBem";
const bem = useBem('tip');
</script>
1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

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