# vite-plugin-file-create

> 一个vite插件, 在vite打包时创建文件并保存至输出目录

Latest version **0.0.3** (published 2023-06-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install vite-plugin-file-create
pnpm add vite-plugin-file-create
yarn add vite-plugin-file-create
bun add vite-plugin-file-create
```

## 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.3 |
| Published | 2023-06-28 |
| First published | 2023-06-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^14.18.0 \|\| >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | hxy1992 |
| Keywords | vite, vite-plugin |

## Links

- npm: https://www.npmjs.com/package/vite-plugin-file-create
- Homepage: https://github.com/Hxy1992/vite-plugin-file-create
- npm.io page: https://npm.io/package/vite-plugin-file-create

## 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.3 (latest) — 2023-06-28
- 0.0.2 — 2023-06-21
- 0.0.1 — 2023-06-20

## README

# vite-plugin-file-create


一个vite插件, 在vite打包时创建文件并保存至输出目录.

## 安装

```shell
npm i -D vite-plugin-file-create # yarn add -D vite-plugin-file-create
```

## 使用

下面是一个示例：生成版本号文件并保存到输出目录。

```js
// vite.config.js / vite.config.ts
import { viteFileCreate } from 'vite-plugin-file-create'

const versionStr = `V1.0.1.${Date.now()}` // 版本号

export default {
  plugins: [
    viteFileCreate(versionStr, "version.txt")
  ]
}
```

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