@klweb/setup-extend
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@klweb/setup-extend

@klweb/setup-extend 是一款 Vue3 setup 语法糖扩展增强插件,支持在单文件组件 script 标签中定义 name 属性。

安装插件

npm install @klweb/setup-extend -D

如何使用

vite.config.ts 文件中的 plugin[] 中使用插件:

import SetupExtend from '@klweb/setup-extend';
export default defineConfig({
	plugins: [
		SetupExtend()
	]
})

// 禁用扩展

SetupExtend({
	name: false  // 默认 true
})

在组件的 script 标签中定义 name 属性,如:

<script setup lang="ts" name="CustomName">
// ...
</script>

Package Sidebar

Install

npm i @klweb/setup-extend

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

3.97 kB

Total Files

6

Last publish

Collaborators

  • klweb