vite-plugin-externals
JSON →A Vite plugin that converts import statements into global variable lookups (window['Lib']), replicating Webpack's externals functionality for production builds. Version 0.6.2 requires Vite >=2.0.0 and Node ^14.18.0 || >=16.0.0. Unlike manual Rollup externals, this plugin transforms source code at the JS level, preserving static analysis. Released under MIT, with occasional updates. Key differentiator: supports deeply chained global paths (e.g., window['React']['lazy']) and works on JSX/TSX files after SFC transformation. Does not affect SSR by default; CJS/SSR users need separate handling.
Traffic · last 30 days ↑14% vs prev 7d
total hits 21
actors 7 distinct systems
last hit 1d ago AhrefsBot
top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany
Resources
API endpoints
full doc /v1/registry/vite-plugin-externals
compatibility /v1/registry/vite-plugin-externals/compatibility