1.0.12 • Published 3 years ago

vite-plugin-vue3-bem v1.0.12

Weekly downloads
-
License
ISC
Repository
github
Last release
3 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

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago