# vite-plugin-vue-setup-extend

> Extending the vue script setup syntactic sugar

Latest version **0.4.0** (published 2022-01-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install vite-plugin-vue-setup-extend
pnpm add vite-plugin-vue-setup-extend
yarn add vite-plugin-vue-setup-extend
bun add vite-plugin-vue-setup-extend
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2022-01-27 |
| First published | 2021-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 158 |
| Author | Vben |
| Maintainers | vvben |
| Keywords | vite, vue, stup, vite-plugin |

## Links

- npm: https://www.npmjs.com/package/vite-plugin-vue-setup-extend
- Repository: https://github.com/vbenjs/vite-plugin-vue-setup-extend
- Homepage: https://github.com/vbenjs/vite-plugin-vue-setup-extend/tree/master/#readme
- Issues: https://github.com/vbenjs/vite-plugin-vue-setup-extend/issues
- npm.io page: https://npm.io/package/vite-plugin-vue-setup-extend

## Dependencies (2)

- [magic-string](https://npm.io/package/magic-string.md) ^0.25.7
- [@vue/compiler-sfc](https://npm.io/package/@vue/compiler-sfc.md) ^3.2.29

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.4.0 (latest) — 2022-01-27
- 0.3.0 — 2021-12-27
- 0.1.0 — 2021-08-25

## README

# vite-plugin-vue-setup-name-support

Make the vue script setup syntax support the name attribute

## Install (yarn or npm)

**node version:** >=12.0.0

**vite version:** >=2.0.0

```bash
yarn add vite-plugin-vue-setup-extend -D
```

or

```bash
npm i vite-plugin-vue-setup-extend -D
```

## Usage

- Config plugin in vite.config.ts. In this way, the required functions can be introduced as needed

```ts
import { defineConfig, Plugin } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueSetupExtend from 'vite-plugin-vue-setup-extend'

export default defineConfig({
  plugins: [vue(), vueSetupExtend()],
})
```

- SFC

```html
<template>
  <div>hello world {{ a }}</div>
</template>

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

## Sample project

[Vben Admin](https://github.com/anncwb/vue-vben-admin)

## License

MIT

---
_Source: https://npm.io/package/vite-plugin-vue-setup-extend · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
