# vite-plugin-vue-auto-name

> A Vite plugin to automatically generate file names for Vue components

Latest version **0.0.4** (published 2022-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install vite-plugin-vue-auto-name
pnpm add vite-plugin-vue-auto-name
yarn add vite-plugin-vue-auto-name
bun add vite-plugin-vue-auto-name
```

## 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.0.4 |
| Published | 2022-04-10 |
| First published | 2022-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Dongsheng |
| Maintainers | philadelphia |
| Keywords | vite, vue, auto-name |

## Links

- npm: https://www.npmjs.com/package/vite-plugin-vue-auto-name
- Repository: https://github.com/Blackman99/vite-plugin-vue-auto-name
- npm.io page: https://npm.io/package/vite-plugin-vue-auto-name

## 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.0.4 (latest) — 2022-04-10
- 0.0.3 — 2022-03-30
- 0.0.2 — 2022-03-30
- 0.0.1 — 2022-03-30

## README

## Background

Solve the name property missing after bundled.  

When using this, you don't need to provide the name property manually anymore

for example `/foo/bar/YourComponent.vue`: 

```vue
<script setup>
// ... some scripts
</script>
<template>
  <!-- ... some dom -->
</template>
```

will be bundled into something like this:

```js
const _sfc_main = /* @__PURE__ */ _defineComponent({
  name: "YourComponent",
  // ... Your code
})
```

## Install

```
npm install -D vite-plugin-vue-auto-name
yarn add -D vite-plugin-vue-auto-name
pnpm add -D vite-plugin-vue-auto-name
```

## Usage

```js
// vite.config.js
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vitePluginVueAutoName from 'vite-plugin-vue-auto-name'

export default defineConfig({
  plugins: [
    vue(), 
    vitePluginVueAutoName(),
    // ...other plugins
  ]
})
```

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