Skip to content

Commit

Permalink
fix updated examples (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
husayt authored Aug 12, 2024
1 parent a98e167 commit c7c2615
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
10 changes: 5 additions & 5 deletions examples/vite-vite/vite-host/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import RD from 'react-dom/client';
import Remote2App from 'remote2/App';
import Button from 'remote3/button';

import { AgGridDemo } from 'viteViteRemote/AgGridDemo';
import App1 from 'viteViteRemote/App1';
import { App2 } from 'viteViteRemote/App2';
import { AgGridDemo } from '@namespace/viteViteRemote/AgGridDemo';
import App1 from '@namespace/viteViteRemote/App1';
import { App2 } from '@namespace/viteViteRemote/App2';
import { ref } from 'vue';

console.log('share vue', ref);
console.log('share React', R, RD);
console.log('Share vue', ref);
console.log('Share React', R, RD);

export default function () {
return (
Expand Down
27 changes: 13 additions & 14 deletions examples/vite-vite/vite-host/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,21 @@ export default defineConfig({
remote2: 'mfapp02@https://unpkg.com/mf-app-02/dist/remoteEntry.js',
remote3:
'remote1@https://unpkg.com/react-manifest-example_remote1@1.0.6/dist/mf-manifest.json',
'viteViteRemote': {
'@namespace/viteViteRemote': {
entry: 'http://localhost:5176/remoteEntry.js',
type: 'module',
},
'@namespace/viteViteRemote': {
entry: 'http://localhost:5176/remoteEntry.js',
type: 'module',
},
filename: 'remoteEntry.js',
shared: {
vue: {},
react: {
requiredVersion: '18',
},
'react-dom': {},
},
filename: 'remoteEntry.js',
shared: {
vue: {},
react: {
requiredVersion: '18',
},
runtimePlugins: ['./src/mfPlugins'],
}),
'react-dom': {},
},
runtimePlugins: ['./src/mfPlugins'],
}),
// If you set build.target: "chrome89", you can remove this plugin
false && topLevelAwait(),
],
Expand Down
1 change: 0 additions & 1 deletion examples/vite-vite/vite-remote/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default defineConfig({
react(),
federation({
name: '@namespace/viteViteRemote',
// name: 'viteViteRemote',
exposes: {
'./App1': './src/App1.jsx',
'./App2': './src/App2.jsx',
Expand Down

0 comments on commit c7c2615

Please sign in to comment.