Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sxzz/vite-hyper-config
Use Vite to run Vite's own config.
https://github.com/sxzz/vite-hyper-config
Last synced: about 2 months ago
JSON representation
Use Vite to run Vite's own config.
- Host: GitHub
- URL: https://github.com/sxzz/vite-hyper-config
- Owner: sxzz
- License: mit
- Created: 2023-11-30T00:03:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-28T03:04:50.000Z (about 2 months ago)
- Last Synced: 2024-10-28T06:45:16.709Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 346 KB
- Stars: 18
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# vite-hyper-config [![npm](https://img.shields.io/npm/v/vite-hyper-config.svg)](https://npmjs.com/package/vite-hyper-config)
[![Unit Test](https://github.com/sxzz/vite-hyper-config/actions/workflows/unit-test.yml/badge.svg)](https://github.com/sxzz/vite-hyper-config/actions/workflows/unit-test.yml)
Use Vite to run Vite's own config. In other words, transform and run `vite.config.ts` with Vite.
## Install
```bash
npm i vite-hyper-config
```## Usage
```ts
import { startVite } from 'vite-hyper-config'
import { DevPlugin } from './plugin'startVite(
{
// (Optional)
// Vite config for transforming client code (undering `src`)
// Will be merged with result of `vite.config.ts` if it exists
},
{
// (Optional)
// Vite config for transforming `vite.config.ts` itself
plugins: [DevPlugin()],
},
{
// (Optional)
// Runner options, see https://github.com/vitest-dev/vitest/blob/main/packages/vite-node/src/types.ts#L92-L111
deps: {
// Also transform some dependency
inline: ['@vitejs/plugin-vue'],
},
},
)
```## Sponsors
## License
[MIT](./LICENSE) License © 2023 [三咲智子 Kevin Deng](https://github.com/sxzz)