In recent years, micro-frontend architecture has been searching for the right path. However, we encountered various complex technical solutions that used layers of packaging and artificial isolation to simulate an ideal micro-frontend world. These solutions imposed heavy performance burdens, complicated simple development tasks, and obscured standard processes.
In our micro-frontend architecture practice, we experienced firsthand the many limitations of traditional solutions:
These issues were particularly prominent in an enterprise-level project in 2019. At that time, a large product was split into over a dozen independent business subsystems that needed to share a common set of basic and business components. The initial npm package-based component sharing solution revealed serious maintenance efficiency issues in practice: when shared components were updated, all dependent subsystems had to undergo a complete build and deployment process.
To address the component sharing efficiency issues, Esmx v1.0 introduced an HTTP protocol-based RemoteView component mechanism. This approach enabled on-demand code assembly across services through runtime dynamic requests, successfully resolving problems with lengthy build dependency chains. However, the lack of standardized runtime communication mechanisms created efficiency bottlenecks in state synchronization and event transmission between services.
In version 2.0, we adopted Webpack 5.0's Module Federation technology. This approach significantly improved inter-service collaboration efficiency through a unified module loading mechanism and runtime container. However, in large-scale implementations, Module Federation's closed implementation mechanism introduced new challenges: achieving precise dependency version management became difficult, particularly when unifying shared dependencies across multiple services, often resulting in version conflicts and runtime exceptions.
When planning version 3.0, we closely observed front-end ecosystem development trends and discovered that advances in browser native capabilities opened new possibilities for Micro-Frontend architecture:
With comprehensive support for ECMAScript Modules (ESM) across mainstream browsers and the maturation of the Import Maps specification, frontend development has entered a true modular era. According to Can I Use statistics, native ESM support in mainstream browsers (Chrome >= 89, Edge >= 89, Firefox >= 108, Safari >= 16.4) has reached 93.5%, providing us with several key advantages:
At the same time, through compatibility mode support (Chrome >= 64, Edge >= 79, Firefox >= 67, Safari >= 11.1), we can further improve browser coverage to 95.59%, allowing us to maintain high performance without sacrificing support for older browsers.
The native module system brings not only standardization, but more importantly, substantial improvements in both performance and isolation:
In the implementation process of the technical solution, the selection of build tools is a key decision point. After nearly a year of technical research and practice, our selection went through the following evolution:
Vite Exploration
Rspack Adoption
This decision enabled us to achieve more stable production environment support while maintaining an excellent development experience. By combining ESM with Rspack, we ultimately built a high-performance, minimally intrusive Micro-Frontend solution.
In our future development roadmap, the Esmx framework will focus on the following three key directions:
Through these optimizations and extensions, we hope to make Esmx a more complete and easy-to-use micro-frontend solution, providing developers with a better development experience and higher development efficiency.