What are Legacy Bundles?
A legacy bundle is code that wasn't compiled as an ES module. This is quite common in the enterprise space where browsers such as IE11 are still required in some capacity.
Reasons for supporting them
- Your client or business may have intranet websites that rely on older browsers
- You don't have knowlegde of which devices you need to support
- You aren't ready to solely adopt ES modules yet (most likely)
How do I build them for AEM?
This question isn't strictly related to AEM, more so Vite. Please refer to the browser compatibility section of Vite's documentation which explains how to add legacy support to your bundles.