What’s New in icejs 2.0? Exploring Vite Mode, SWC, and Enhanced Frontend Capabilities
icejs 2.0, the progressive React‑based framework from Alibaba’s ICE team, introduces Vite mode, Webpack 5 upgrades, SWC/esbuild compilation, expanded MPA/SPA/micro‑frontend support, SSG/SSR enhancements, pre‑bundled dependencies, and a unified development experience, while detailing performance benchmarks and migration steps.
What is icejs?
icejs is a progressive development framework built on React, released by Alibaba’s ICE team in February 2020. It is widely used inside Alibaba (over 400 repositories daily) and by the community, serving more than 3,000 developers and 5,000 projects.
Why use icejs?
The framework provides built‑in features and a plugin system to ensure consistency across projects, reduces repetitive work with out‑of‑the‑box capabilities (TypeScript, CSS Modules, MPA/SPA/micro‑frontend, etc.), and lowers the cost of complex functionalities such as SSR/SSG.
New 2.0 version
Since the 1.0 launch, icejs has released over 70 versions, adding features and stability. Two major industry trends influence 2.0:
Bundle‑less development with ES modules (e.g., Vite, Snowpack).
Rewriting front‑end toolchains in Rust/Go (swc, esbuild, Rome).
To improve developer experience, the team spent three months and over 100 pull requests on icejs 2.0, released on 2021‑09‑28. Key features include:
Vite mode : Parallel support for Vite alongside Webpack, keeping configuration consistent.
Webpack 5 : Upgraded to Module Federation, Cache, and other new capabilities.
swc & esbuild : Experimental replacement of Babel with swc and terser with esbuild for faster compilation.
Enhanced business solutions : State management, request library, environment config, micro‑frontend, SSR, new SSG, PWA, keep‑alive, etc.
New documentation : Built with Docusaurus, offering better SEO, dark mode, search, and mobile experience.
Quick project creation supports templates such as antd and fusion:
$ npm init ice icejs-example</code><code># also works with yarn</code><code>$ yarn init ice icejs-exampleFor optimal installation speed, use cnpm or a domestic npm registry. The AppWorks visual tool is also available as a VS Code extension.
Vite mode: breakthrough
Vite’s native ES‑module support and fast dev server dramatically improve start‑up and hot‑update times. In tests with a complex project (fusion‑design‑pro), Vite’s first start is ~50% faster than Webpack, while hot updates are over 10× quicker (≈100 ms). { "vite": true } Configuration is unified via build.json, supporting publicPath, alias, etc., while webpack‑chain handles underlying Webpack settings. An adaptation layer ( webpack‑service / vite‑service) and wp2vite convert Webpack config to Vite automatically.
Webpack mode: steady progress
Icejs continues to support existing Webpack projects. Webpack 5 brings Cache‑based hot start improvements (≈5× faster) and React Fast Refresh (≈30% faster). Module Federation enables pre‑building dependencies as remote modules, reducing bundle time.
{ "remoteRuntime": true }SWC replaces Babel (experimental)
Using Rust‑based swc speeds up JavaScript compilation by ~50% and compression by ~35%. The switch is experimental because some Babel plugins are not yet compatible.
{ "swc": true }More new features
Micro‑frontend x ESM : icestark now supports ESM‑based micro‑apps via loadScriptMode: import.
SSG matching SSR : Simple build.json flag { "ssr": "static" } generates static HTML for each route while keeping SSR data fetching capabilities.
Stable dependency management : 70+ community NPM packages are pre‑bundled to avoid breaking changes and speed up installation.
Future directions
The team aims to further完善 Vite‑mode capabilities (SSR/SSG, static assets handling, unified AST conversion) and promote a lightweight full‑stack development model using JavaScript on both front‑ and back‑end, with Serverless support for Node.js deployments.
For more information, visit the ICE team’s GitHub repository and community links.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
