{"id":20653,"library":"vite-babel-plugin","title":"vite-babel-plugin","description":"A Vite plugin that enables Babel transformation during the build process, allowing developers to apply custom Babel plugins and presets. Current version is 0.0.2, but it is marked as deprecated/unmaintained. It only supports Vite 1.x (vite@^1.0.0-rc.9 || ^1.0.0), which is also deprecated. For modern Vite projects (v2+), use official Vite plugins or @rollup/plugin-babel. This plugin is more of a proof-of-concept than a production-ready tool.","status":"deprecated","version":"0.0.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","vite","vue3","babel"],"install":[{"cmd":"npm install vite-babel-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add vite-babel-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-babel-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; only compatible with Vite 1.x","package":"vite","optional":false}],"imports":[{"note":"ESM-only; CommonJS require is not supported as it's a Vite plugin designed for ESM.","wrong":"const viteBabel = require('vite-babel-plugin')","symbol":"default","correct":"import viteBabel from 'vite-babel-plugin'"},{"note":"Named export is available but default export is also provided. Named export reduces risk of naming collisions.","wrong":"import viteBabel from 'vite-babel-plugin'","symbol":"viteBabel (named)","correct":"import { viteBabel } from 'vite-babel-plugin'"},{"note":"No official types declared; use @types or define manually.","wrong":null,"symbol":"types (if any)","correct":"import type { ViteBabelOptions } from 'vite-babel-plugin'"}],"quickstart":{"code":"import { defineConfig } from 'vite';\nimport viteBabel from 'vite-babel-plugin';\n\nexport default defineConfig({\n  plugins: [\n    viteBabel({\n      babelConfig: {\n        plugins: [['@babel/plugin-transform-arrow-functions', { spec: true }]],\n        presets: ['@babel/preset-env']\n      }\n    })\n  ]\n});","lang":"typescript","description":"Shows how to use vite-babel-plugin in a Vite config with custom Babel plugins and presets."},"warnings":[{"fix":"Migrate to @rollup/plugin-babel with Vite's rollupOptions.","message":"Package is deprecated; no updates since 2020. Use @rollup/plugin-babel or official Vite plugins instead.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Upgrade Vite to v2+ and switch to compatible Babel integration.","message":"Only works with Vite 1.x; incompatible with Vite 2+.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Use module:false in @babel/preset-env targets or avoid preset-env for library builds.","message":"Babel config should not include @babel/preset-env for library mode, as it may transform ES modules incorrectly.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install vite-babel-plugin --save-dev' and ensure node_modules is present.","cause":"Package not installed or installed as devDependency incorrectly.","error":"Cannot find module 'vite-babel-plugin'"},{"fix":"Use 'import viteBabel from 'vite-babel-plugin'' for default or 'import { viteBabel } from 'vite-babel-plugin'' for named.","cause":"Using default import when named export was intended; or vice versa.","error":"TypeError: viteBabel is not a function"},{"fix":"Downgrade Vite to 1.x or use an alternative Babel plugin for Vite 2+.","cause":"Incompatible Vite version; plugin requires Vite 1.x.","error":"Error: Vite version 2.x is not supported"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}