Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yzydeveloper/vite-plugin-babel-compiler
Using Babel Compiler with Vite
https://github.com/yzydeveloper/vite-plugin-babel-compiler
Last synced: 29 days ago
JSON representation
Using Babel Compiler with Vite
- Host: GitHub
- URL: https://github.com/yzydeveloper/vite-plugin-babel-compiler
- Owner: yzydeveloper
- License: mit
- Created: 2022-04-30T07:44:33.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-21T01:51:09.000Z (about 1 year ago)
- Last Synced: 2024-10-16T08:08:12.466Z (2 months ago)
- Language: TypeScript
- Size: 41 KB
- Stars: 24
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-vite - vite-plugin-babel-compiler - The plugin works with Babel compiler. (Plugins / Framework-agnostic Plugins)
- awesome-vite - vite-plugin-babel-compiler - The plugin works with Babel compiler. (Plugins / Framework-agnostic Plugins)
README
# vite-plugin-babel-compiler
Vite runtime uses Babel compiler
> Work around some experimental features not supported by Esbuild.
## Install
```bash
npm i -D vite-plugin-babel-compiler
```Add plugin to your `vite.config.ts`:
## Config Decorator
```bash
npm install -D @babel/plugin-proposal-class-properties
npm install -D @babel/plugin-proposal-decorators
``````typescript
import babel from 'vite-plugin-babel-compiler'{
plugins: [
babel({
babel: {
plugins: [
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
],
exclude: ['dep',/path/]
include: ['dep',/path/]
}
})
]
}```