Vite Plugin Legacy SWC
JSON →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.
Traffic · last 30 days ↓78% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇬🇧 United Kingdom · 🇩🇪 Germany · 🇫🇷 France