Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elonehoo/vite-plugin-alias
Alias auto generation for Vite
https://github.com/elonehoo/vite-plugin-alias
alias generation plugin vite
Last synced: 10 days ago
JSON representation
Alias auto generation for Vite
- Host: GitHub
- URL: https://github.com/elonehoo/vite-plugin-alias
- Owner: elonehoo
- License: mit
- Created: 2022-10-31T05:56:00.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-15T04:41:51.000Z (7 months ago)
- Last Synced: 2024-04-17T06:53:34.566Z (7 months ago)
- Topics: alias, generation, plugin, vite
- Language: TypeScript
- Homepage:
- Size: 580 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# vite-plugin-alias
[![NPM version](https://img.shields.io/npm/v/vite-plugin-alias?color=a1b858&label=)](https://www.npmjs.com/package/vite-plugin-alias)
> Alias auto generation for Vite.
## Install
```bash
#npm
npm install --save-dev vite-plugin-alias# yarn
yarn add --dev vite-plugin-alias# pnpm
pnpm install --save-dev vite-plugin-alias
```## Usage
Add it to `vite.config.js`
```ts
// vite.config.ts
import Alias from 'vite-plugin-alias'export default {
plugins: [
Alias()
]
}
```## Credits
Thanks to:
- [@Subwaytime/vite-aliases](https://github.com/Subwaytime/vite-aliases)
- [@haiya6/vite-plugin-html-resolve-alias](https://github.com/haiya6/vite-plugin-html-resolve-alias)
- [@Codpoe/vite-plugin-ts-alias](https://github.com/Codpoe/vite-plugin-ts-alias)
- [@code-ManL/vite-plugin-alias2](https://github.com/code-ManL/vite-plugin-alias2)