vitral 0.13.1 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,41 +1,45 @@
1
1
  <p align="center">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/banner-escuro.png">
4
- <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/banner.png" width="640" alt="vitral. Feito de partes. Visto como um todo.">
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/banner-escuro-en.png">
4
+ <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/banner-en.png" width="640" alt="vitral. Made of parts. Seen as a whole.">
5
5
  </picture>
6
6
  </p>
7
7
 
8
8
  <p align="center">
9
9
  <a href="https://github.com/joaogabriel15/vitral/actions/workflows/ci.yml"><img src="https://github.com/joaogabriel15/vitral/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
10
10
  <a href="https://www.npmjs.com/package/vitral"><img src="https://img.shields.io/npm/v/vitral" alt="npm"></a>
11
- <a href="https://bundlejs.com/?q=vitral"><img src="https://img.shields.io/bundlejs/size/vitral" alt="tamanho"></a>
12
- <a href="https://github.com/joaogabriel15/vitral/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/vitral" alt="licença MIT"></a>
11
+ <a href="https://bundlejs.com/?q=vitral"><img src="https://img.shields.io/bundlejs/size/vitral" alt="size"></a>
12
+ <a href="https://github.com/joaogabriel15/vitral/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/vitral" alt="MIT license"></a>
13
13
  </p>
14
14
 
15
15
  <p align="center">
16
- <a href="https://joaogabriel15.github.io/vitral/">Documentação</a> ·
17
- <a href="https://joaogabriel15.github.io/vitral/aprender/configurar">Começar</a> ·
18
- <a href="https://joaogabriel15.github.io/vitral/por-que">Por que o vitral</a> ·
19
- <a href="https://joaogabriel15.github.io/vitral/aprender/benchmark">Benchmark</a> ·
20
- <a href="./README.en.md">English</a>
16
+ <a href="https://joaogabriel15.github.io/vitral/en/">Docs</a> ·
17
+ <a href="https://joaogabriel15.github.io/vitral/en/aprender/configurar">Get started</a> ·
18
+ <a href="https://joaogabriel15.github.io/vitral/en/por-que">Why vitral</a> ·
19
+ <a href="https://joaogabriel15.github.io/vitral/en/aprender/benchmark">Benchmark</a> ·
20
+ <a href="https://github.com/joaogabriel15/vitral/blob/main/README.md">Português</a>
21
21
  </p>
22
22
 
23
- Micro-frontends com qualquer framework, sem configurar build no host. React, Next.js, Vue, Nuxt, Angular, Svelte e outros na mesma página.
23
+ Micro-frontends with any framework, with no build config on the host. React, Next.js, Vue, Nuxt, Angular, Svelte and more on one page.
24
24
 
25
- **O que é:** um micro-frontend é um pedaço da página que uma equipe constrói e publica sozinha, como o carrinho, a busca ou a área do cliente. O vitral junta esses pedaços numa página só, mesmo que cada um use um framework diferente.
25
+ **What it is:** a micro-frontend is a part of the page that one team builds and ships on its own, like the cart, the search or the account area. vitral puts those parts together on one page, even when each one uses a different framework.
26
26
 
27
- **Como funciona:** cada equipe gera o seu pedaço (um *remote*) com `vite build` e publica num CDN. A página principal (o *host*) recebe a URL de cada remote e monta tudo no navegador.
27
+ **How it works:** each team builds its part (a *remote*) with `vite build` and deploys it to a CDN. The main page (the *host*) gets the URL of each remote and mounts them in the browser.
28
28
 
29
- **Por que usar:**
29
+ **Why use it:**
30
30
 
31
- - **Zero configuração no host.** Sem plugin de build: só `configure({ remotes })` com a URL de cada remote.
32
- - **Qualquer framework.** React, Next, Vue, Nuxt, Angular, Svelte, Solid, Preact, Lit e JS puro na mesma página. Sem combinar versão de React entre equipes.
33
- - **Deploy independente.** Cada equipe publica quando quiser. O host vê a versão nova sem novo build.
34
- - **CSS e erros isolados.** O CSS de um remote não muda o resto da página. Um remote fora do ar mostra o próprio erro, e o resto continua funcionando.
35
- - **Seguro.** O JS só roda se vier de uma origem permitida e se o hash SHA-384 bater.
36
- - **Leve e rápido.** 5,1 kB de host. Abre a página na metade do tempo do Module Federation e troca de área 4,5 vezes mais rápido que o Next.js Multi-Zones.
31
+ - **Zero host config.** No build plugin: just `configure({ remotes })` with the URL of each remote.
32
+ - **Any framework.** React, Next, Vue, Nuxt, Angular, Svelte, Solid, Preact, Lit and plain JS on the same page. No React version to agree on between teams.
33
+ - **Independent deploys.** Each team ships when it wants. The host picks up the new version without a new build.
34
+ - **Isolated CSS and errors.** A remote's CSS does not change the rest of the page. A remote that is down shows its own error, and the rest keeps working.
35
+ - **Secure.** The JS only runs if it comes from an allowed origin and its SHA-384 hash matches.
36
+ - **Small and fast.** 5.1 kB of host code. Opens the page in half the time of Module Federation and switches areas 4.5 times faster than Next.js Multi-Zones.
37
37
 
38
- **Quando usar:** quando várias equipes mexem no mesmo site e cada uma quer publicar no próprio ritmo. Com uma equipe e um app só, um bundle comum é mais simples.
38
+ <p align="center">
39
+ <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/demo-en.gif" width="720" alt="A plain HTML shop with two remotes: the catalog in Vue and the cart in React. Clicking Add in the catalog updates the cart. A third remote, Reviews, is offline and shows only its own error message, while the rest of the page keeps working.">
40
+ </p>
41
+
42
+ **When to use it:** when several teams work on the same site and each wants to ship at its own pace. With one team and one app, a regular bundle is simpler.
39
43
 
40
44
  ```bash
41
45
  npm install vitral
@@ -43,70 +47,81 @@ npm install vitral
43
47
 
44
48
  <p align="center">
45
49
  <picture>
46
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/como-funciona-escuro.png">
47
- <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/como-funciona.png" width="900" alt="Três equipes (React, Vue, Angular) publicam um vitral.json cada uma num CDN. O host lê as URLs com configure e monta os três remotes na mesma página.">
50
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/como-funciona-escuro-en.png">
51
+ <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/como-funciona-en.png" width="900" alt="Three teams (React, Vue, Angular) each publish a vitral.json to a CDN. The host reads the URLs with configure and mounts the three remotes on the same page.">
48
52
  </picture>
49
53
  </p>
50
54
 
51
- ## Comparação
55
+ ## Comparison
52
56
 
53
57
  | | Module Federation | single-spa | Next.js Multi-Zones | vitral |
54
58
  |---|---|---|---|---|
55
- | Configuração no host | Plugin no build, combinado com cada remote | Root config e import map | Um app Next por zona e rewrites | Nenhuma. Só `configure()` |
56
- | Frameworks | Combinar versões em `shared` | Um adaptador e um ciclo de vida por framework | Só Next | Qualquer um, sem combinar versão |
57
- | Divide a página em | Pedaços | Apps por rota | Rotas (cada zona é uma página) | Pedaços ou rotas |
58
- | Trocar de área | Sem recarregar | Sem recarregar | Recarrega a página e baixa Next e React de novo | Sem recarregar |
59
- | Isolamento de CSS | Nenhum | Nenhum | Por página | Escopo automático ou Shadow DOM |
60
- | Remote fora do ar | Erro sem tratamento derruba a página | A tela de erro é com você | A zona inteira fica fora | Só aquele remote mostra erro, com `retry` |
61
- | Código de host (brotli) | 19,4 kB | 5,8 kB | Runtime do Next em cada zona | 5,1 kB |
59
+ | Host config | Build plugin, matched with each remote | Root config and import map | One Next app per zone, plus rewrites | None. Just `configure()` |
60
+ | Frameworks | Agree on versions in `shared` | One adapter and lifecycle per framework | Next only | Any, no versions to agree on |
61
+ | Splits the page into | Parts | Apps per route | Routes (each zone is a page) | Parts or routes |
62
+ | Switching areas | No reload | No reload | Reloads the page and downloads Next and React again | No reload |
63
+ | CSS isolation | None | None | Per page | Automatic scope or Shadow DOM |
64
+ | Remote is down | An unhandled error takes the page down | The error screen is up to you | The whole zone is down | Only that remote shows an error, with `retry` |
65
+ | Host code (brotli) | 19.4 kB | 5.8 kB | Next runtime in each zone | 5.1 kB |
66
+
67
+ **Other tools:**
62
68
 
63
- ## Velocidade
69
+ | | qiankun | micro-app | wujie | Native import maps | vitral |
70
+ |---|---|---|---|---|---|
71
+ | The remote publishes | HTML page and UMD build | HTML page | HTML page | ES modules | `vitral.json` and an ES module |
72
+ | Host setup | `registerMicroApps` and `start` | `microApp.start()` and `<micro-app>` | `startApp` or the wujie component | `<script type="importmap">` | `configure({ remotes })` |
73
+ | JS isolation | `Proxy` sandbox | `Proxy` sandbox or iframe | iframe: the JS runs in an iframe and the UI in the host | None | None by default. `isolate="iframe"` isolates, without passing functions in props |
74
+ | CSS isolation | Shadow DOM or prefix, if turned on | Prefix by default, Shadow DOM optional | Shadow DOM | None | Automatic scope or Shadow DOM |
75
+ | Mount, update, errors | `bootstrap`, `mount`, `unmount` | `<micro-app>` element | Component or `startApp` | You write it | `<Remote>` with `fallback`, `error` and `retry` |
76
+ | Repeated dependencies | Each app downloads its own | Each app downloads its own | Each app downloads its own | One URL per package in the import map | Each remote ships its own. A single copy with `dedupe` |
64
77
 
65
- Medido no Chromium com rede de celular lenta (Slow 4G). Mediana de 7 visitas. Menor é melhor.
78
+ qiankun, micro-app and wujie isolate the JS of existing apps without changing them: wujie with a real iframe, qiankun and micro-app with a `Proxy`. vitral runs the remote's JS on the page itself, with the page's DOM and props of any type, and only isolates with `isolate="iframe"`.
66
79
 
67
- **Contra o Module Federation**, com o React compartilhado entre os remotes:
80
+ ## Speed
81
+
82
+ Measured in Chromium on a slow mobile network (Slow 4G). Median of 7 visits. Lower is better.
83
+
84
+ **Against Module Federation**, with React shared between remotes:
68
85
 
69
86
  | | vitral | Module Federation |
70
87
  |---|--:|--:|
71
- | Abrir a página com 1 remote | **1,1 s** | 2,6 s |
72
- | Abrir a página com 8 remotes | **2,1 s** | 4,5 s |
73
- | Baixado com 8 remotes | **153 kB** | 409 kB |
88
+ | Open the page with 1 remote | **1.1 s** | 2.6 s |
89
+ | Open the page with 8 remotes | **2.1 s** | 4.5 s |
90
+ | Downloaded with 8 remotes | **153 kB** | 409 kB |
74
91
 
75
- **Contra o Next.js Multi-Zones**, com o app dividido em duas áreas:
92
+ **Against Next.js Multi-Zones**, with the app split into two areas:
76
93
 
77
94
  | | vitral | Multi-Zones |
78
95
  |---|--:|--:|
79
- | Abrir a primeira área | **0,7 s** | 1,0 s |
80
- | Trocar de área | **0,2 s** | 0,8 s |
81
- | Baixado para abrir as duas áreas | **83 kB** | 229 kB |
82
-
83
- [Como foi medido](https://joaogabriel15.github.io/vitral/aprender/benchmark): versões, máquina e o script para rodar de novo.
96
+ | Open the first area | **0.7 s** | 1.0 s |
97
+ | Switch areas | **0.2 s** | 0.8 s |
98
+ | Downloaded to open both areas | **83 kB** | 229 kB |
84
99
 
85
- Os 10 frameworks têm testes de ponta a ponta no CI, com host e remote de frameworks diferentes, em Chromium, Firefox, WebKit e mobile.
100
+ The minimal host code is 5.1 kB with brotli. [How it was measured](https://joaogabriel15.github.io/vitral/en/aprender/benchmark): versions, machine and the script to run it again.
86
101
 
87
- ## Começo rápido
102
+ ## Quick start
88
103
 
89
- Exemplo: uma loja em React mostra o carrinho, feito por outra equipe. Os dois lados abaixo têm os mesmos arquivos, na mesma ordem.
104
+ Example: a React shop shows the cart, built by another team. Both sides below have the same files, in the same order.
90
105
 
91
- ### Hoje, com Module Federation
106
+ ### Today, with Module Federation
92
107
 
93
108
  ```jsx
94
- // carrinho/src/Carrinho.jsx
95
- export default function Carrinho({ userId }) {
96
- return <p>Carrinho do usuário {userId}</p>
109
+ // cart/src/Cart.jsx
110
+ export default function Cart({ userId }) {
111
+ return <p>Cart for user {userId}</p>
97
112
  }
98
113
  ```
99
114
 
100
115
  ```js
101
- // carrinho/webpack.config.js
116
+ // cart/webpack.config.js
102
117
  const { ModuleFederationPlugin } = require('webpack').container
103
118
 
104
119
  module.exports = {
105
120
  plugins: [
106
121
  new ModuleFederationPlugin({
107
- name: 'carrinho',
122
+ name: 'cart',
108
123
  filename: 'remoteEntry.js',
109
- exposes: { './Carrinho': './src/Carrinho.jsx' },
124
+ exposes: { './Cart': './src/Cart.jsx' },
110
125
  shared: { react: { singleton: true }, 'react-dom': { singleton: true } },
111
126
  }),
112
127
  ],
@@ -114,14 +129,14 @@ module.exports = {
114
129
  ```
115
130
 
116
131
  ```js
117
- // loja/webpack.config.js
132
+ // shop/webpack.config.js
118
133
  const { ModuleFederationPlugin } = require('webpack').container
119
134
 
120
135
  module.exports = {
121
136
  plugins: [
122
137
  new ModuleFederationPlugin({
123
- name: 'loja',
124
- remotes: { carrinho: 'carrinho@https://cdn.empresa.com/carrinho/remoteEntry.js' },
138
+ name: 'shop',
139
+ remotes: { cart: 'cart@https://cdn.example.com/cart/remoteEntry.js' },
125
140
  shared: { react: { singleton: true }, 'react-dom': { singleton: true } },
126
141
  }),
127
142
  ],
@@ -129,196 +144,196 @@ module.exports = {
129
144
  ```
130
145
 
131
146
  ```jsx
132
- // loja/src/App.jsx
147
+ // shop/src/App.jsx
133
148
  import { lazy, Suspense } from 'react'
134
149
 
135
- const Carrinho = lazy(() => import('carrinho/Carrinho'))
150
+ const Cart = lazy(() => import('cart/Cart'))
136
151
 
137
152
  export function App() {
138
153
  return (
139
- <Suspense fallback={<p>Carregando…</p>}>
140
- <Carrinho userId={42} />
154
+ <Suspense fallback={<p>Loading…</p>}>
155
+ <Cart userId={42} />
141
156
  </Suspense>
142
157
  )
143
158
  }
144
159
  ```
145
160
 
146
- ### O mesmo app com vitral
161
+ ### The same app with vitral
147
162
 
148
163
  ```jsx
149
- // carrinho/src/Carrinho.jsx (igual)
150
- export default function Carrinho({ userId }) {
151
- return <p>Carrinho do usuário {userId}</p>
164
+ // cart/src/Cart.jsx (same)
165
+ export default function Cart({ userId }) {
166
+ return <p>Cart for user {userId}</p>
152
167
  }
153
168
  ```
154
169
 
155
170
  ```js
156
- // carrinho/vite.config.js (no lugar do webpack.config.js)
171
+ // cart/vite.config.js (instead of webpack.config.js)
157
172
  import react from '@vitejs/plugin-react'
158
173
  import vitral from 'vitral/vite'
159
174
 
160
175
  export default {
161
176
  plugins: [
162
177
  react(),
163
- vitral({ name: 'carrinho', entry: 'src/Carrinho.jsx', dedupe: ['react'] }),
178
+ vitral({ name: 'cart', entry: 'src/Cart.jsx', dedupe: ['react'] }),
164
179
  ],
165
180
  }
166
181
  ```
167
182
 
168
183
  ```js
169
- // loja/webpack.config.js (sem o ModuleFederationPlugin)
184
+ // shop/webpack.config.js (without ModuleFederationPlugin)
170
185
  module.exports = {
171
186
  plugins: [],
172
187
  }
173
188
  ```
174
189
 
175
190
  ```jsx
176
- // loja/src/App.jsx
191
+ // shop/src/App.jsx
177
192
  import { configure } from 'vitral'
178
193
  import { Remote } from 'vitral/react'
179
194
 
180
- configure({ remotes: { carrinho: 'https://cdn.empresa.com/carrinho/vitral.json' } })
195
+ configure({ remotes: { cart: 'https://cdn.example.com/cart/vitral.json' } })
181
196
 
182
197
  export function App() {
183
- return <Remote name="carrinho" props={{ userId: 42 }} fallback={<p>Carregando…</p>} />
198
+ return <Remote name="cart" props={{ userId: 42 }} fallback={<p>Loading…</p>} />
184
199
  }
185
200
  ```
186
201
 
187
- `vite build` no carrinho gera o JS, o CSS e o `vitral.json`. Publique a pasta `dist` em qualquer CDN. Para gerar loja e carrinho prontos: `npm create vitral@latest`.
202
+ `vite build` in the cart outputs the JS, the CSS and `vitral.json`. Publish the `dist` folder to any CDN. To generate a ready shop and cart: `npm create vitral@latest`.
188
203
 
189
- ### O que muda
204
+ ### What changes
190
205
 
191
206
  | | Module Federation | vitral |
192
207
  |---|---|---|
193
- | Build da loja | Plugin com `remotes` e `shared` | Sem plugin |
194
- | Versão do React | Combinada entre as equipes (`singleton`) | O carrinho usa o React da loja quando a versão serve (`dedupe`), senão o próprio |
195
- | Framework | O mesmo nos dois lados | Qualquer um. A loja em React pode mostrar um carrinho em Vue |
208
+ | Shop build | Plugin with `remotes` and `shared` | No plugin |
209
+ | React version | Agreed between teams (`singleton`) | The cart uses the shop React when the version fits (`dedupe`), otherwise its own |
210
+ | Framework | The same on both sides | Any. A React shop can show a Vue cart |
196
211
 
197
- Numa página HTML qualquer, sem build:
212
+ On any HTML page, no build:
198
213
 
199
214
  ```html
200
215
  <script type="module" src="https://cdn.jsdelivr.net/npm/vitral/dist/auto.js"></script>
201
- <vitral-remote src="https://cdn.empresa.com/carrinho/vitral.json" props='{"userId": 42}'></vitral-remote>
216
+ <vitral-remote src="https://cdn.example.com/cart/vitral.json" props='{"userId": 42}'></vitral-remote>
202
217
  ```
203
218
 
204
- Guia completo: [Migrar do Module Federation](https://joaogabriel15.github.io/vitral/migracao/module-federation).
219
+ Full guide: [Migrate from Module Federation](https://joaogabriel15.github.io/vitral/en/migracao/module-federation).
205
220
 
206
221
  ## Frameworks
207
222
 
208
223
  | Framework | Remote | Host | Import |
209
224
  |---|---|---|---|
210
225
  | React 18/19 | `reactRemote(App)` | `<Remote>` | `vitral/react` |
211
- | Next.js (App e Pages Router) | `reactRemote(App)` | `<Remote>` | `vitral/react` |
226
+ | Next.js (App and Pages Router) | `reactRemote(App)` | `<Remote>` | `vitral/react` |
212
227
  | Vue 3 | `vueRemote(App, { setup })` | `<VitralRemote>` | `vitral/vue` |
213
228
  | Nuxt 3/4 | `vueRemote(App, { setup })` | `<VitralRemote>` | `vitral/vue` |
214
229
  | Angular 17+ | `angularRemote(Component, { providers })` | `<vitral-remote>` + `provideVitral()` | `vitral/angular` |
215
230
  | Svelte 5 | `svelteRemote(App)` | `use:remote` | `vitral/svelte` |
216
231
  | Solid | `solidRemote(App)` | `<Remote>` | `vitral/solid` |
217
232
  | Preact | `preactRemote(App)` | `<Remote>` | `vitral/preact` |
218
- | Lit e Web Components | `elementRemote('meu-widget')` | `<vitral-remote>` | `vitral/element` |
219
- | JS e TypeScript puro | `component({ render })` | `<vitral-remote>` | `vitral` |
233
+ | Lit and Web Components | `elementRemote('my-widget')` | `<vitral-remote>` | `vitral/element` |
234
+ | Plain JS and TypeScript | `component({ render })` | `<vitral-remote>` | `vitral` |
220
235
 
221
- Host e remote não precisam ser do mesmo framework. Cada um tem uma página com exemplo completo em [Frameworks](https://joaogabriel15.github.io/vitral/frameworks/react).
236
+ Host and remote do not need to use the same framework.
222
237
 
223
- ## Next.js como host
238
+ ## Next.js as host
224
239
 
225
- Exemplo: uma loja em Next.js com a área "Minha conta", feita por outra equipe. Os dois lados abaixo têm os mesmos arquivos, na mesma ordem. Com vitral, a loja ganha um arquivo novo no fim.
240
+ Example: a Next.js shop with a "My account" area, built by another team. Both sides below have the same files, in the same order. With vitral, the shop gets one new file at the end.
226
241
 
227
242
  <p align="center">
228
243
  <picture>
229
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/multizonas-escuro.png">
230
- <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/multizonas.png" width="900" alt="À esquerda, Multi-Zones: dois apps Next, rewrites e a página recarrega ao trocar de área (0,8 s). À direita, vitral: um app Next com withVitral, a conta é um remote dentro do layout e a troca é sem recarregar (0,2 s).">
244
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/multizonas-escuro-en.png">
245
+ <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/multizonas-en.png" width="900" alt="Left, Multi-Zones: two Next apps, rewrites, and the page reloads when switching areas (0.8 s). Right, vitral: one Next app with withVitral, the account is a remote inside the layout and switching does not reload (0.2 s).">
231
246
  </picture>
232
247
  </p>
233
248
 
234
- ### Hoje, com Multi-Zones
249
+ ### Today, with Multi-Zones
235
250
 
236
251
  ```
237
- loja/ app Next principal
238
- conta/ segundo app Next (a zona)
252
+ shop/ main Next app
253
+ account/ second Next app (the zone)
239
254
  ```
240
255
 
241
256
  ```tsx
242
- // conta/pages/index.tsx
243
- export default function Conta() {
244
- return <h1>Minha conta</h1>
257
+ // account/pages/index.tsx
258
+ export default function Account() {
259
+ return <h1>My account</h1>
245
260
  }
246
261
  ```
247
262
 
248
263
  ```js
249
- // conta/next.config.js
264
+ // account/next.config.js
250
265
  module.exports = {
251
- basePath: '/conta',
252
- assetPrefix: '/conta-static',
266
+ basePath: '/account',
267
+ assetPrefix: '/account-static',
253
268
  }
254
269
  ```
255
270
 
256
271
  ```js
257
- // loja/next.config.js
272
+ // shop/next.config.js
258
273
  module.exports = {
259
274
  async rewrites() {
260
275
  return [
261
- { source: '/conta', destination: `${process.env.CONTA_URL}/conta` },
262
- { source: '/conta/:path+', destination: `${process.env.CONTA_URL}/conta/:path+` },
263
- { source: '/conta-static/:path+', destination: `${process.env.CONTA_URL}/conta-static/:path+` },
276
+ { source: '/account', destination: `${process.env.ACCOUNT_URL}/account` },
277
+ { source: '/account/:path+', destination: `${process.env.ACCOUNT_URL}/account/:path+` },
278
+ { source: '/account-static/:path+', destination: `${process.env.ACCOUNT_URL}/account-static/:path+` },
264
279
  ]
265
280
  },
266
281
  }
267
282
  ```
268
283
 
269
284
  ```tsx
270
- // loja/pages/_app.tsx
285
+ // shop/pages/_app.tsx
271
286
  export default function App({ Component, pageProps }) {
272
287
  return <Component {...pageProps} />
273
288
  }
274
289
  ```
275
290
 
276
291
  ```tsx
277
- // loja/components/Menu.tsx
278
- // <a>, não <Link>: a página recarrega e baixa Next e React de novo.
279
- <a href="/conta">Minha conta</a>
292
+ // shop/components/Menu.tsx
293
+ // <a>, not <Link>: the page reloads and downloads Next and React again.
294
+ <a href="/account">My account</a>
280
295
  ```
281
296
 
282
- ### O mesmo app com vitral
297
+ ### The same app with vitral
283
298
 
284
299
  ```
285
- loja/ app Next (o host)
286
- conta/ o mesmo código, buildado com Vite (o remote)
300
+ shop/ Next app (the host)
301
+ account/ the same code, built with Vite (the remote)
287
302
  ```
288
303
 
289
304
  ```tsx
290
- // conta/pages/index.tsx (igual)
291
- export default function Conta() {
292
- return <h1>Minha conta</h1>
305
+ // account/pages/index.tsx (same)
306
+ export default function Account() {
307
+ return <h1>My account</h1>
293
308
  }
294
309
  ```
295
310
 
296
311
  ```js
297
- // conta/vite.config.js (no lugar do next.config.js)
312
+ // account/vite.config.js (instead of next.config.js)
298
313
  import react from '@vitejs/plugin-react'
299
314
  import vitral from 'vitral/vite'
300
315
 
301
316
  export default {
302
317
  plugins: [
303
318
  react(),
304
- vitral({ name: 'conta', entry: 'pages/index.tsx', next: { basePath: '/conta' }, dedupe: ['react'] }),
319
+ vitral({ name: 'account', entry: 'pages/index.tsx', next: { basePath: '/account' }, dedupe: ['react'] }),
305
320
  ],
306
321
  }
307
322
  ```
308
323
 
309
324
  ```js
310
- // loja/next.config.js (withVitral no lugar das rewrites)
325
+ // shop/next.config.js (withVitral instead of rewrites)
311
326
  const { withVitral } = require('vitral/next-config')
312
327
 
313
328
  module.exports = withVitral({}, {
314
329
  remotes: {
315
- conta: { url: 'https://cdn.empresa.com/conta/vitral.json', basePath: '/conta' },
330
+ account: { url: 'https://cdn.example.com/account/vitral.json', basePath: '/account' },
316
331
  },
317
332
  })
318
333
  ```
319
334
 
320
335
  ```tsx
321
- // loja/pages/_app.tsx (mais o <VitralNext />)
336
+ // shop/pages/_app.tsx (plus <VitralNext />)
322
337
  import { VitralNext } from 'vitral/next-host'
323
338
 
324
339
  export default function App({ Component, pageProps }) {
@@ -327,210 +342,210 @@ export default function App({ Component, pageProps }) {
327
342
  ```
328
343
 
329
344
  ```tsx
330
- // loja/components/Menu.tsx
331
- // <Link>: a troca é sem recarregar, e o React não baixa de novo.
332
- <Link href="/conta">Minha conta</Link>
345
+ // shop/components/Menu.tsx
346
+ // <Link>: switching does not reload, and React is not downloaded again.
347
+ <Link href="/account">My account</Link>
333
348
  ```
334
349
 
335
350
  ```tsx
336
- // loja/pages/conta/[[...slug]].tsx (arquivo novo: a página da loja que mostra a conta)
351
+ // shop/pages/account/[[...slug]].tsx (new file: the shop page that shows the account)
337
352
  import { NextRemote } from 'vitral/next-host'
338
353
 
339
- export default function Conta() {
340
- return <NextRemote name="conta" fallback={<p>Carregando…</p>} />
354
+ export default function Account() {
355
+ return <NextRemote name="account" fallback={<p>Loading…</p>} />
341
356
  }
342
357
  ```
343
358
 
344
- Com `next: { basePath }`, o código da conta pode continuar usando `next/link` e `useRouter`.
359
+ With `next: { basePath }`, the account code can keep using `next/link` and `useRouter`.
345
360
 
346
- ### O que muda
361
+ ### What changes
347
362
 
348
363
  | | Multi-Zones | vitral |
349
364
  |---|---|---|
350
- | Apps Next | Um por área | Só a loja |
351
- | Configuração | `basePath` e `assetPrefix` na zona, `rewrites` na loja | Plugin na conta, `withVitral` na loja |
352
- | Trocar de área | Recarrega a página (0,8 s no benchmark) | Sem recarregar (0,2 s) |
353
- | React e Next | Baixados de novo em cada área | Uma cópia para a página toda |
354
- | Layout da loja | Cada zona repete o seu | A conta fica dentro do layout da loja |
365
+ | Next apps | One per area | Only the shop |
366
+ | Config | `basePath` and `assetPrefix` in the zone, `rewrites` in the shop | Plugin in the account, `withVitral` in the shop |
367
+ | Switching areas | Reloads the page (0.8 s in the benchmark) | No reload (0.2 s) |
368
+ | React and Next | Downloaded again in each area | One copy for the whole page |
369
+ | Shop layout | Each zone repeats its own | The account sits inside the shop layout |
355
370
 
356
- Guia completo, com SSR por rota e prefetch: [Migrar do Next.js Multi-Zones](https://joaogabriel15.github.io/vitral/migracao/multi-zones). No App Router, o host usa `<Remote>` de `vitral/react` num componente `'use client'`: veja [Next.js](https://joaogabriel15.github.io/vitral/frameworks/next#host-com-app-router).
371
+ Full guide, with per-route SSR and prefetch: [Migrate from Next.js Multi-Zones](https://joaogabriel15.github.io/vitral/en/migracao/multi-zones). With the App Router, the host uses `<Remote>` from `vitral/react` in a `'use client'` component: see [Next.js](https://joaogabriel15.github.io/vitral/en/frameworks/next#host-with-app-router).
357
372
 
358
- ## Nuxt como host
373
+ ## Nuxt as host
359
374
 
360
- Exemplo: uma loja em Nuxt com a área "Catálogo", feita por outra equipe. Os dois lados abaixo têm os mesmos arquivos, na mesma ordem. Com vitral, a loja ganha dois arquivos novos no fim.
375
+ Example: a Nuxt shop with a "Catalog" area, built by another team. Both sides below have the same files, in the same order. With vitral, the shop gets two new files at the end.
361
376
 
362
- ### Hoje, com dois apps Nuxt
377
+ ### Today, with two Nuxt apps
363
378
 
364
379
  ```
365
- loja/ app Nuxt principal
366
- catalogo/ segundo app Nuxt
380
+ shop/ main Nuxt app
381
+ catalog/ second Nuxt app
367
382
  ```
368
383
 
369
384
  ```vue
370
- <!-- catalogo/app/pages/index.vue -->
385
+ <!-- catalog/app/pages/index.vue -->
371
386
  <template>
372
- <h1>Catálogo</h1>
387
+ <h1>Catalog</h1>
373
388
  </template>
374
389
  ```
375
390
 
376
391
  ```ts
377
- // catalogo/nuxt.config.ts
392
+ // catalog/nuxt.config.ts
378
393
  export default defineNuxtConfig({
379
- app: { baseURL: '/catalogo/' },
394
+ app: { baseURL: '/catalog/' },
380
395
  })
381
396
  ```
382
397
 
383
398
  ```ts
384
- // loja/nuxt.config.ts
399
+ // shop/nuxt.config.ts
385
400
  export default defineNuxtConfig({
386
401
  routeRules: {
387
- '/catalogo/**': { proxy: `${process.env.CATALOGO_URL}/catalogo/**` },
402
+ '/catalog/**': { proxy: `${process.env.CATALOG_URL}/catalog/**` },
388
403
  },
389
404
  })
390
405
  ```
391
406
 
392
407
  ```vue
393
- <!-- loja/app/components/Menu.vue -->
394
- <!-- <a>, não <NuxtLink>: a página recarrega e baixa Nuxt e Vue de novo. -->
395
- <a href="/catalogo">Catálogo</a>
408
+ <!-- shop/app/components/Menu.vue -->
409
+ <!-- <a>, not <NuxtLink>: the page reloads and downloads Nuxt and Vue again. -->
410
+ <a href="/catalog">Catalog</a>
396
411
  ```
397
412
 
398
- ### O mesmo app com vitral
413
+ ### The same app with vitral
399
414
 
400
415
  ```
401
- loja/ app Nuxt (o host)
402
- catalogo/ o mesmo componente, buildado com Vite (o remote)
416
+ shop/ Nuxt app (the host)
417
+ catalog/ the same component, built with Vite (the remote)
403
418
  ```
404
419
 
405
420
  ```vue
406
- <!-- catalogo/app/pages/index.vue (igual) -->
421
+ <!-- catalog/app/pages/index.vue (same) -->
407
422
  <template>
408
- <h1>Catálogo</h1>
423
+ <h1>Catalog</h1>
409
424
  </template>
410
425
  ```
411
426
 
412
427
  ```js
413
- // catalogo/vite.config.js (no lugar do nuxt.config.ts)
428
+ // catalog/vite.config.js (instead of nuxt.config.ts)
414
429
  import vue from '@vitejs/plugin-vue'
415
430
  import vitral from 'vitral/vite'
416
431
 
417
432
  export default {
418
433
  plugins: [
419
434
  vue(),
420
- vitral({ name: 'catalogo', entry: 'app/pages/index.vue', dedupe: ['vue'] }),
435
+ vitral({ name: 'catalog', entry: 'app/pages/index.vue', dedupe: ['vue'] }),
421
436
  ],
422
437
  }
423
438
  ```
424
439
 
425
440
  ```ts
426
- // loja/nuxt.config.ts (sem o proxy)
441
+ // shop/nuxt.config.ts (without the proxy)
427
442
  export default defineNuxtConfig({})
428
443
  ```
429
444
 
430
445
  ```vue
431
- <!-- loja/app/components/Menu.vue -->
432
- <!-- <NuxtLink>: a troca é sem recarregar. -->
433
- <NuxtLink to="/catalogo">Catálogo</NuxtLink>
446
+ <!-- shop/app/components/Menu.vue -->
447
+ <!-- <NuxtLink>: switching does not reload. -->
448
+ <NuxtLink to="/catalog">Catalog</NuxtLink>
434
449
  ```
435
450
 
436
451
  ```ts
437
- // loja/app/plugins/vitral.client.ts (arquivo novo: registra o catálogo)
452
+ // shop/app/plugins/vitral.client.ts (new file: registers the catalog)
438
453
  import * as Vue from 'vue'
439
454
  import { configure } from 'vitral'
440
455
 
441
456
  export default defineNuxtPlugin(() => {
442
457
  configure({
443
- remotes: { catalogo: 'https://cdn.empresa.com/catalogo/vitral.json' },
444
- dedupe: { vue: { version: Vue.version, modules: { vue: Vue } } }, // o catálogo usa este Vue
458
+ remotes: { catalog: 'https://cdn.example.com/catalog/vitral.json' },
459
+ dedupe: { vue: { version: Vue.version, modules: { vue: Vue } } }, // the catalog uses this Vue
445
460
  })
446
461
  })
447
462
  ```
448
463
 
449
464
  ```vue
450
- <!-- loja/app/pages/catalogo/[...slug].vue (arquivo novo: a página da loja que mostra o catálogo) -->
465
+ <!-- shop/app/pages/catalog/[...slug].vue (new file: the shop page that shows the catalog) -->
451
466
  <script setup lang="ts">
452
467
  import { VitralRemote } from 'vitral/vue'
453
468
  </script>
454
469
 
455
470
  <template>
456
- <VitralRemote name="catalogo">
457
- <template #fallback><p>Carregando…</p></template>
471
+ <VitralRemote name="catalog">
472
+ <template #fallback><p>Loading…</p></template>
458
473
  </VitralRemote>
459
474
  </template>
460
475
  ```
461
476
 
462
- O servidor renderiza o `fallback` e o catálogo monta no navegador. Não precisa de `<ClientOnly>`.
477
+ The server renders the `fallback` and the catalog mounts in the browser. No `<ClientOnly>` needed.
463
478
 
464
- ### O que muda
479
+ ### What changes
465
480
 
466
- | | Dois apps Nuxt | vitral |
481
+ | | Two Nuxt apps | vitral |
467
482
  |---|---|---|
468
- | Apps Nuxt | Um por área | Só a loja |
469
- | Configuração | `baseURL` no catálogo, `proxy` na loja | Plugin no catálogo, `configure()` na loja |
470
- | Trocar de área | Recarrega a página | Sem recarregar |
471
- | Vue e Nuxt | Baixados de novo em cada área | Uma cópia do Vue para a página toda |
472
- | Layout da loja | Cada app repete o seu | O catálogo fica dentro do layout da loja |
483
+ | Nuxt apps | One per area | Only the shop |
484
+ | Config | `baseURL` in the catalog, `proxy` in the shop | Plugin in the catalog, `configure()` in the shop |
485
+ | Switching areas | Reloads the page | No reload |
486
+ | Vue and Nuxt | Downloaded again in each area | One copy of Vue for the whole page |
487
+ | Shop layout | Each app repeats its own | The catalog sits inside the shop layout |
473
488
 
474
- ## O que mais vem junto
489
+ ## What else comes with it
475
490
 
476
- **Dependências compartilhadas.** Com `vitral({ dedupe: ['react'] })`, o remote usa o React que já está na página e não baixa outra cópia. [Dedupe](https://joaogabriel15.github.io/vitral/aprender/dedupe)
491
+ **Shared dependencies.** With `vitral({ dedupe: ['react'] })`, the remote uses the React already on the page instead of downloading another copy.
477
492
 
478
493
  <p align="center">
479
494
  <picture>
480
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/dedupe-escuro.png">
481
- <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/dedupe.png" width="900" alt="Sem dedupe, cada remote baixa o próprio React. Com dedupe, os remotes usam o React que já está na página quando a versão serve; o que não serve baixa o próprio.">
495
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/dedupe-escuro-en.png">
496
+ <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/dedupe-en.png" width="900" alt="Without dedupe, each remote downloads its own React. With dedupe, remotes use the React already on the page when the version fits; one that doesn't fit loads its own.">
482
497
  </picture>
483
498
  </p>
484
499
 
485
- **Comunicação entre remotes.** `events` manda mensagens entre remotes, e `provide` e `shared` guardam estado comum, como o usuário logado. [Props e eventos](https://joaogabriel15.github.io/vitral/aprender/props-eventos) e [Contexto compartilhado](https://joaogabriel15.github.io/vitral/aprender/contexto)
500
+ **Communication between remotes.** `events` sends messages between remotes, and `provide` and `shared` hold common state, like the signed-in user.
486
501
 
487
502
  <p align="center">
488
503
  <picture>
489
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/comunicacao-escuro.png">
490
- <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/comunicacao.png" width="900" alt="Três remotes em React, Vue e Angular. O carrinho emite um evento, a busca recebe pelo mesmo barramento, e a conta lê o usuário que o host criou com provide.">
504
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/comunicacao-escuro-en.png">
505
+ <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/comunicacao-en.png" width="900" alt="Three remotes in React, Vue and Angular. The cart emits an event, the search receives it on the same bus, and the account reads the user the host created with provide.">
491
506
  </picture>
492
507
  </p>
493
508
 
494
- **Segurança.** O JS só roda se vier de uma origem permitida e, com `integrity`, se o hash bater. [SRI e origens](https://joaogabriel15.github.io/vitral/aprender/seguranca)
509
+ **Security.** The JS only runs if it comes from an allowed origin and, with `integrity`, if the hash matches.
495
510
 
496
511
  <p align="center">
497
512
  <picture>
498
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/seguranca-escuro.png">
499
- <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/seguranca.png" width="900" alt="O host configura allowedOrigins e integrity. Antes de rodar, a lib confere a origem e o SHA-384. Se um dos dois falha, nada executa e o erro aparece no lugar do remote.">
513
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/seguranca-escuro-en.png">
514
+ <img src="https://raw.githubusercontent.com/joaogabriel15/vitral/main/docs/public/marca/seguranca-en.png" width="900" alt="The host sets allowedOrigins and integrity. Before running, the library checks the origin and the SHA-384. If either fails, nothing runs and the error shows in place of the remote.">
500
515
  </picture>
501
516
  </p>
502
517
 
503
- E também:
518
+ Also:
504
519
 
505
- - **CSS e Tailwind:** o CSS de cada remote vale só dentro dele, ou use Shadow DOM com `isolate="shadow"`. [Estilos](https://joaogabriel15.github.io/vitral/aprender/estilos)
506
- - **Carregamento:** `loading="lazy"`, `prefetch="hover"` e `keepAlive` para abrir e voltar mais rápido. [Carregamento](https://joaogabriel15.github.io/vitral/aprender/carregamento)
507
- - **Erros:** cada erro tem um código e uma página com causa e correção, e `retry` monta só aquele remote de novo. [Erros](https://joaogabriel15.github.io/vitral/erros/)
508
- - **Props tipadas:** `npx vitral types` faz uma prop errada não compilar no host. [Contratos](https://joaogabriel15.github.io/vitral/aprender/contratos)
509
- - **Rotas, SSR e deploy:** app shell por rota, HTML do remote no servidor, canary e rollback. [Rotas](https://joaogabriel15.github.io/vitral/aprender/rotas), [SSR](https://joaogabriel15.github.io/vitral/aprender/ssr) e [Canary](https://joaogabriel15.github.io/vitral/aprender/canary)
510
- - **Testes:** `mockRemote` e `failingRemote` testam o host sem rede. [Testes](https://joaogabriel15.github.io/vitral/aprender/testes)
520
+ - **CSS and Tailwind:** each remote's CSS only applies inside it, or use Shadow DOM with `isolate="shadow"`.
521
+ - **Loading:** `loading="lazy"`, `prefetch="hover"` and `keepAlive` to open and come back faster.
522
+ - **Errors:** every error has a code and a page with the cause and the fix, and `retry` mounts only that remote again.
523
+ - **Typed props:** `npx vitral types` makes a wrong prop fail to compile on the host.
524
+ - **Routes, SSR and deploys:** app shell per route, the remote's HTML from the server, canary and rollback.
525
+ - **Tests:** `mockRemote` and `failingRemote` test the host without the network.
511
526
 
512
- ## Rodar local e com Docker
527
+ ## Local and Docker
513
528
 
514
- Cada remote roda no próprio `vite dev`, numa porta, e o host aponta para essas portas:
529
+ Each remote runs its own `vite dev` on a port, and the host points at those ports:
515
530
 
516
531
  ```json
517
- // loja/public/remotes.json
532
+ // shop/public/remotes.json
518
533
  {
519
- "carrinho": "http://localhost:5174/vitral.json",
520
- "busca": "http://localhost:5175/vitral.json"
534
+ "cart": "http://localhost:5174/vitral.json",
535
+ "search": "http://localhost:5175/vitral.json"
521
536
  }
522
537
  ```
523
538
 
524
539
  ```js
525
- // loja/src/main.jsx
540
+ // shop/src/main.jsx
526
541
  configure({ remotes: '/remotes.json' })
527
542
  ```
528
543
 
529
- Editar o remote atualiza o host sem recarregar a página. Com Docker, cada remote vira uma imagem nginx e o host lê a lista de remotes de uma variável de ambiente, então a mesma imagem serve em qualquer ambiente. [Local e Docker](https://joaogabriel15.github.io/vitral/aprender/local-e-docker) e o exemplo [`examples/docker`](https://github.com/joaogabriel15/vitral/tree/main/examples/docker).
544
+ Editing a remote updates the host without a page reload. With Docker, each remote is an nginx image and the host reads its remote list from an environment variable, so one image works in every environment. Full example: [`examples/docker`](https://github.com/joaogabriel15/vitral/tree/main/examples/docker).
530
545
 
531
546
  ## Links
532
547
 
533
- - [Documentação](https://joaogabriel15.github.io/vitral/): guias, referência e páginas de erro.
534
- - [Exemplos](https://github.com/joaogabriel15/vitral/tree/main/examples): o mesmo remote em 8 frameworks e 9 hosts.
535
- - [Como contribuir](https://github.com/joaogabriel15/vitral/blob/main/CONTRIBUTING.md)
536
- - Licença [MIT](https://github.com/joaogabriel15/vitral/blob/main/LICENSE). Feito por [Pacheco Codes](https://pacheco.dev.br/).
548
+ - [Docs](https://joaogabriel15.github.io/vitral/en/): guides, reference and error pages. Also available in Portuguese.
549
+ - [Examples](https://github.com/joaogabriel15/vitral/tree/main/examples): the same remote in 8 frameworks and 9 hosts.
550
+ - [Contributing](https://github.com/joaogabriel15/vitral/blob/main/CONTRIBUTING.md)
551
+ - [MIT](https://github.com/joaogabriel15/vitral/blob/main/LICENSE) license. Made by [Pacheco Codes](https://pacheco.dev.br/).
package/dist/next.d.ts CHANGED
@@ -118,7 +118,7 @@ type ImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'width' | 'h
118
118
  }) => string;
119
119
  onLoadingComplete?: (img: HTMLImageElement) => void;
120
120
  };
121
- declare const Image: react.ForwardRefExoticComponent<Omit<ImgHTMLAttributes<HTMLImageElement>, "height" | "width" | "loading" | "src"> & {
121
+ declare const Image: react.ForwardRefExoticComponent<Omit<ImgHTMLAttributes<HTMLImageElement>, "loading" | "src" | "width" | "height"> & {
122
122
  src: string | StaticImage;
123
123
  alt: string;
124
124
  width?: number | string;
package/dist/vue.d.ts CHANGED
@@ -127,9 +127,9 @@ declare const VitralRemote: vue.DefineComponent<vue.ExtractPropTypes<{
127
127
  onError?: ((...args: any[]) => any) | undefined;
128
128
  onReady?: ((...args: any[]) => any) | undefined;
129
129
  }>, {
130
- name: string;
131
130
  isolate: Isolation;
132
131
  priority: RequestPriority;
132
+ name: string;
133
133
  loading: Loading;
134
134
  src: string;
135
135
  props: Props;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitral",
3
- "version": "0.13.1",
4
- "description": "Micro-frontends com qualquer framework, sem configurar build no host. React, Next.js, Vue, Nuxt, Angular, Svelte e outros na mesma página.",
3
+ "version": "0.13.2",
4
+ "description": "Micro-frontends for any framework with zero host build config. Mix React, Next.js, Vue, Nuxt, Angular, Svelte and more on one page.",
5
5
  "keywords": [
6
6
  "micro-frontend",
7
7
  "micro-frontends",