vite-plugin-babel-compiler
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

vite-plugin-babel-compiler

Vite runtime uses Babel compiler

Work around some experimental features not supported by Esbuild.

Install

npm i -D vite-plugin-babel-compiler

Add plugin to your vite.config.ts:

Config Decorator

npm install -D @babel/plugin-proposal-class-properties
npm install -D @babel/plugin-proposal-decorators
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/]
            }
        })
    ]
}

Readme

Keywords

Package Sidebar

Install

npm i vite-plugin-babel-compiler

Weekly Downloads

34

Version

0.4.0

License

MIT

Unpacked Size

13.7 kB

Total Files

6

Last publish

Collaborators

  • yzydeveloper