vite-plugin-treat-umd-as-commonjs
JSON →Vite plugin that resolves edge cases when using RequireJS/AMD in the browser by injecting `var define = false;` into UMD modules, preventing RequireJS from hijacking them. This addresses a specific issue where Vite's UMD-to-CommonJS conversion breaks in a browser RequireJS environment (vitejs/vite#5900). Current version 0.1.4, ships TypeScript types, requires Vite as peer dependency. Use this when you need to serve UMD modules via Vite but the page also includes RequireJS (e.g., legacy dependencies). The plugin is lightweight and scoped to this single concern.
Traffic · last 30 days stale · no recent hits
total hits 21
actors 6 distinct systems
last hit 16d ago ByteDance
top countries 🇺🇸 United States · 🇸🇬 Singapore · VN · 🇨🇦 Canada · 🇫🇷 France