{"library":"vite-plugin-legacy-swc","type":"library","category":null,"description":"vite-plugin-legacy-swc is a Vite plugin designed to provide robust legacy browser support for production builds by leveraging SWC for efficient JavaScript transpilation. As of its current stable version, 2.0.1, the plugin offers a significantly faster alternative to `@vitejs/plugin-legacy`, with benchmark results indicating a 58% reduction in CPU time and a 4% decrease in JS asset size. It operates by generating corresponding legacy chunks for each bundle chunk, transforming them into SystemJS modules using `@swc/core`, and automatically injecting necessary polyfills and the SystemJS runtime based on specified browser targets and actual code usage. The plugin intelligently injects `<script nomodule>` tags into the generated HTML, ensuring that legacy bundles and polyfills are conditionally loaded only in browsers that require them. The project has a consistent release cadence, with multiple updates throughout 2024 and 2025 addressing bug fixes and introducing new features.","language":"javascript","status":"active","version":"2.0.1","tags":["javascript","vite","vite-plugin","legacy","swc"],"last_verified":"Wed May 27","install":[{"cmd":"npm install vite-plugin-legacy-swc","imports":["import legacy from 'vite-plugin-legacy-swc'"]},{"cmd":"yarn add vite-plugin-legacy-swc","imports":[]},{"cmd":"pnpm add vite-plugin-legacy-swc","imports":[]}],"homepage":null,"github":"https://github.com/CyanSalt/vite-plugin-legacy-swc","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vite-plugin-legacy-swc","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/vite-plugin-legacy-swc/compatibility"}}