Skip to content
프로젝트

소개

Web Components와 iframe을 기반으로 하는 마이크로 프런트엔드 프레임워크로, 매우 낮은 비용과 빠른 렌더링, 네이티브 격리를 제공합니다.

웹 및 앱 개발

이 수치를 측정하는 방법

What you can do

  • Minimal setup in the main app
  • Little to zero adaptation needed in sub-apps
  • Fast first-screen rendering with preloading and pre-execution
  • Native-level runtime performance without with(proxy) overhead

측정된 스타 증가

in 24h
+2
in 7 days
+3
in 15 days
+4
in 1 month
+13

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Wujie logo

Wujie

The Ultimate Micro-Frontend Framework powered by Web Components + iframe

npm version npm downloads MIT license

English | 简体中文

Wujie is a micro-frontend framework built on Web Components and iframes, delivering low adoption cost, high performance, native isolation, and a rich feature set.

Documentation & Demos

Background

While micro-frontends have matured considerably, existing solutions still struggle with core developer requirements such as adaptation overhead, CSS isolation, runtime performance, blank-screen flickering, cross-app communication, sub-app keep-alive, activating multiple sub-apps simultaneously, Vite / ESM support, and dependency sharing.

Web Components (Shadow DOM) provide browser-native style encapsulation, while an iframe provides a browser-native JavaScript execution sandbox with its own window, document, history, and location. By combining a Web Component container with an iframe sandbox, Wujie achieves strict native isolation while addressing all of the challenges above.

Features

  1. Low Adoption Cost
    • Minimal setup in the main app
    • Little to zero adaptation needed in sub-apps
  2. High Performance
    • Fast first-screen rendering with preloading and pre-execution
    • Native-level runtime performance without with(proxy) overhead
  3. Native Isolation
    • Strict CSS isolation via Web Components (Shadow DOM)
    • Strict JavaScript isolation inside a same-origin iframe
  4. Rich Capabilities
    • App-level Keep-Alive mode
    • Nested sub-apps
    • Multiple active sub-apps on the same page with route synchronization
    • Dependency sharing across apps
    • Decentralized communication (EventBus, props, window)
    • Comprehensive lifecycle hooks
    • Extensible plugin system
    • First-class Vite & ESM support

Packages

Package Description npm
wujie Framework-agnostic core runtime npm
wujie-vue2 Vue 2 wrapper component npm
wujie-vue3 Vue 3 wrapper component npm
wujie-react React wrapper component npm

Quick Start

Vanilla JS / Framework-Agnostic

  • Install
npm install wujie
  • Usage
import { startApp } from "wujie";

startApp({ name: "unique-id", url: "https://sub-app-url/", el: "#container", sync: true });

Vue

  • Install
# Vue 2
npm install wujie-vue2
# Vue 3
npm install wujie-vue3
  • Register
// Vue 2
import WujieVue from "wujie-vue2";
Vue.use(WujieVue);

// Vue 3
import WujieVue from "wujie-vue3";
app.use(WujieVue);
  • Usage
<WujieVue
  width="100%"
  height="100%"
  name="xxx"
  :url="url"
  :sync="true"
  :fetch="fetch"
  :props="props"
  :beforeLoad="beforeLoad"
  :beforeMount="beforeMount"
  :afterMount="afterMount"
  :beforeUnmount="beforeUnmount"
  :afterUnmount="afterUnmount"
></WujieVue>

React

  • Install
npm install wujie-react
  • Import
import WujieReact from "wujie-react";
  • Usage
<WujieReact
  width="100%"
  height="100%"
  name="xxx"
  url={url}
  sync={true}
  fetch={fetch}
  props={props}
  beforeLoad={beforeLoad}
  beforeMount={beforeMount}
  afterMount={afterMount}
  beforeUnmount={beforeUnmount}
  afterUnmount={afterUnmount}
></WujieReact>

FAQ

See the FAQ documentation for common troubleshooting guides (CORS, cookies, Shadow DOM events, relative assets, Vite, Module Federation, etc.).

Local Development

Run the following commands to develop and debug Wujie locally with live reload:

pnpm install            # Install workspace dependencies (pnpm is required)
pnpm run start          # Start all packages and example apps

One More Thing

Wujie originated from Tencent Wuji Low-Code Platform, an enterprise-grade, all-in-one low-code solution widely used across Tencent. With Wujie, legacy pages and low-code pages can seamlessly embed one another, bridging existing and new systems. Explore Tencent Wuji Low-Code to learn more.

관련 프로젝트 살펴보기

불러오는 중…