Skip to content

Commit

Permalink
feat: build manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
doerme committed Oct 23, 2024
1 parent 0b6c65f commit a24448a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions demos/react18/react-app/emp.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ export default defineConfig(store => {
pluginReact(),
pluginRspackEmpShare({
empRuntime: {
runtimeLib: `https://unpkg.com/@empjs/[email protected]/output/sdk.js`,
frameworkLib: `https://unpkg.com/@empjs/[email protected]/dist`,
runtimeLib: "https://unpkg.com/@empjs/[email protected]/output/sdk.js",
frameworkLib: "https://unpkg.com/@empjs/[email protected]/dist",
frameworkGlobal: 'EMP_ADAPTER_REACT',
framework: 'react',
},
}),
],
build: {
polyfill: {
entryCdn: `https://unpkg.com/@empjs/[email protected]/dist/es.js`,
entryCdn: "https://unpkg.com/@empjs/[email protected]/dist/es.js",
},
},
server: {
Expand Down
2 changes: 1 addition & 1 deletion demos/react18/react-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rt.init({
rt.register([
{
name: 'runtimeHost',
// entry: 'http://localhost:1802/emp.js',
// entry: 'http://localhost:1802/mf-manifest.json',
entry: 'https://e8e7be5c.emp-demo-react18-host.pages.dev/emp.js'
},
])
Expand Down
9 changes: 5 additions & 4 deletions demos/react18/react-host/emp.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@ export default defineConfig(store => {
plugins: [
pluginReact(),
pluginRspackEmpShare({
name: `runtimeHost`,
name: "runtimeHost",
exposes: {
'./App': './src/App',
'./CountComp': './src/CountComp',
},
empRuntime: {
runtimeLib: `https://unpkg.com/@empjs/[email protected]/output/sdk.js`,
frameworkLib: `https://unpkg.com/@empjs/[email protected]/dist`,
runtimeLib: "https://unpkg.com/@empjs/[email protected]/output/sdk.js",
frameworkLib: "https://unpkg.com/@empjs/[email protected]/dist",
frameworkGlobal: 'EMP_ADAPTER_REACT',
framework: 'react',
},
manifest: true
}),
],
build: {

polyfill: {
entryCdn: `https://unpkg.com/@empjs/[email protected]/dist/es.js`,
entryCdn: "https://unpkg.com/@empjs/[email protected]/dist/es.js",
},
},
server: {
Expand Down

0 comments on commit a24448a

Please sign in to comment.