Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion advanced-api/automatic-vendor-sharing/app1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"serve": "serve dist -p 3001 --cors",
"clean": "rm -rf dist",
"type-check": "tsc --noEmit",
"analyze": "webpack-bundle-analyzer dist/static/js/*.js"
"analyze": "webpack-bundle-analyzer dist/static/js/*.js",
"prestart": "node ../../../scripts/track-demo-run.js",
"preserve": "node ../../../scripts/track-demo-run.js"
},
"dependencies": {
"react": "^18.3.1",
Expand Down
35 changes: 35 additions & 0 deletions advanced-api/automatic-vendor-sharing/app1/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,40 @@
<head> </head>
<body>
<div id="root"></div>
<!-- Module Federation demo analytics -->
<script>
(function () {
var measurementId = "G-DRPXW0EEVT";
var cidKey = 'mf_examples_ga_cid';
var cid;
try {
cid = window.localStorage && window.localStorage.getItem(cidKey);
if (!cid) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
window.localStorage && window.localStorage.setItem(cidKey, cid);
}
} catch (error) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
}

var hostname = window.location.hostname;
var runtimeContext = /^(localhost|127\.|0\.0\.0\.0|::1)$/.test(hostname) ? 'local' : 'hosted';
var pageLocation = window.location.origin + window.location.pathname;
var params = new URLSearchParams({
v: '2',
tid: measurementId,
cid: cid,
en: 'demo_app_view',
'ep.repository': "module-federation-examples",
'ep.example': "advanced-api",
'ep.demo_path': "advanced-api/automatic-vendor-sharing/app1/public",
'ep.entrypoint': "advanced-api/automatic-vendor-sharing/app1/public/index.html",
'ep.runtime_context': runtimeContext,
dl: pageLocation,
dt: document.title || ('ModuleFederationExamples ' + "advanced-api/automatic-vendor-sharing/app1/public")
});
new Image().src = 'https://www.google-analytics.com/g/collect?' + params.toString();
})();
</script>
</body>
</html>
4 changes: 3 additions & 1 deletion advanced-api/automatic-vendor-sharing/app2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"serve": "serve dist -p 3002 --cors",
"clean": "rm -rf dist",
"type-check": "tsc --noEmit",
"analyze": "webpack-bundle-analyzer dist/static/js/*.js"
"analyze": "webpack-bundle-analyzer dist/static/js/*.js",
"prestart": "node ../../../scripts/track-demo-run.js",
"preserve": "node ../../../scripts/track-demo-run.js"
},
"dependencies": {
"react": "^18.3.1",
Expand Down
35 changes: 35 additions & 0 deletions advanced-api/automatic-vendor-sharing/app2/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,40 @@
<head> </head>
<body>
<div id="root"></div>
<!-- Module Federation demo analytics -->
<script>
(function () {
var measurementId = "G-DRPXW0EEVT";
var cidKey = 'mf_examples_ga_cid';
var cid;
try {
cid = window.localStorage && window.localStorage.getItem(cidKey);
if (!cid) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
window.localStorage && window.localStorage.setItem(cidKey, cid);
}
} catch (error) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
}

var hostname = window.location.hostname;
var runtimeContext = /^(localhost|127\.|0\.0\.0\.0|::1)$/.test(hostname) ? 'local' : 'hosted';
var pageLocation = window.location.origin + window.location.pathname;
var params = new URLSearchParams({
v: '2',
tid: measurementId,
cid: cid,
en: 'demo_app_view',
'ep.repository': "module-federation-examples",
'ep.example': "advanced-api",
'ep.demo_path': "advanced-api/automatic-vendor-sharing/app2/public",
'ep.entrypoint': "advanced-api/automatic-vendor-sharing/app2/public/index.html",
'ep.runtime_context': runtimeContext,
dl: pageLocation,
dt: document.title || ('ModuleFederationExamples ' + "advanced-api/automatic-vendor-sharing/app2/public")
});
new Image().src = 'https://www.google-analytics.com/g/collect?' + params.toString();
})();
</script>
</body>
</html>
4 changes: 3 additions & 1 deletion advanced-api/automatic-vendor-sharing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"legacy:start": "pnpm --filter automatic-vendor-sharing_app* --parallel legacy:start",
"legacy:build": "pnpm --filter automatic-vendor-sharing_app* --parallel legacy:build",
"e2e:ci": "pnpm exec playwright test --config ./playwright.config.ts --reporter=list",
"legacy:e2e:ci": "pnpm legacy:build && LEGACY_START=true pnpm exec playwright test --config ./playwright.config.ts --reporter=list"
"legacy:e2e:ci": "pnpm legacy:build && LEGACY_START=true pnpm exec playwright test --config ./playwright.config.ts --reporter=list",
"prestart": "node ../../scripts/track-demo-run.js",
"preserve": "node ../../scripts/track-demo-run.js"
},
"devDependencies": {
"@playwright/test": "1.58.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"docker:run": "docker run -it --name csr-env-host -p 3000:80 -d -e API_URL=https://host.com/api csr-env/host:0.0.0",
"docker:rm": "docker rm -f csr-env-host",
"legacy:start": "chmod +x ./env.sh && cp env-config.json ./public/ && NODE_ENV=development webpack-cli serve",
"legacy:build": "NODE_ENV=production webpack --mode production"
"legacy:build": "NODE_ENV=production webpack --mode production",
"prestart": "node ../../../scripts/track-demo-run.js",
"preserve": "node ../../../scripts/track-demo-run.js"
},
"dependencies": {
"moment": "^2.30.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,40 @@
<html>
<body>
<div id="root"></div>
<!-- Module Federation demo analytics -->
<script>
(function () {
var measurementId = "G-DRPXW0EEVT";
var cidKey = 'mf_examples_ga_cid';
var cid;
try {
cid = window.localStorage && window.localStorage.getItem(cidKey);
if (!cid) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
window.localStorage && window.localStorage.setItem(cidKey, cid);
}
} catch (error) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
}

var hostname = window.location.hostname;
var runtimeContext = /^(localhost|127\.|0\.0\.0\.0|::1)$/.test(hostname) ? 'local' : 'hosted';
var pageLocation = window.location.origin + window.location.pathname;
var params = new URLSearchParams({
v: '2',
tid: measurementId,
cid: cid,
en: 'demo_app_view',
'ep.repository': "module-federation-examples",
'ep.example': "advanced-api",
'ep.demo_path': "advanced-api/dynamic-remotes-runtime-environment-variables/host/public",
'ep.entrypoint': "advanced-api/dynamic-remotes-runtime-environment-variables/host/public/index.html",
'ep.runtime_context': runtimeContext,
dl: pageLocation,
dt: document.title || ('ModuleFederationExamples ' + "advanced-api/dynamic-remotes-runtime-environment-variables/host/public")
});
new Image().src = 'https://www.google-analytics.com/g/collect?' + params.toString();
})();
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"docker:run": "pnpm --filter dynamic-remotes-runtime-environment-variables_* --parallel docker:run",
"docker:rm": "pnpm --filter dynamic-remotes-runtime-environment-variables_* --parallel docker:rm",
"e2e:ci": "npx playwright test",
"legacy:e2e:ci": "USE_LEGACY=1 npx playwright test"
"legacy:e2e:ci": "USE_LEGACY=1 npx playwright test",
"prestart": "node ../../scripts/track-demo-run.js",
"preserve": "node ../../scripts/track-demo-run.js"
},
"devDependencies": {
"@playwright/test": "1.58.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"docker:run": "docker run -it --name csr-env-remote -p 3001:80 -d -e API_URL=https://remote.com/api csr-env/remote:0.0.0",
"docker:rm": "docker rm -f csr-env-remote",
"legacy:start": "chmod +x ./env.sh && cp env-config.json ./public/ && NODE_ENV=development webpack-cli serve",
"legacy:build": "NODE_ENV=production webpack --mode production"
"legacy:build": "NODE_ENV=production webpack --mode production",
"prestart": "node ../../../scripts/track-demo-run.js",
"preserve": "node ../../../scripts/track-demo-run.js"
},
"dependencies": {
"copy-webpack-plugin": "12.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,40 @@
<html>
<body>
<div id="root"></div>
<!-- Module Federation demo analytics -->
<script>
(function () {
var measurementId = "G-DRPXW0EEVT";
var cidKey = 'mf_examples_ga_cid';
var cid;
try {
cid = window.localStorage && window.localStorage.getItem(cidKey);
if (!cid) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
window.localStorage && window.localStorage.setItem(cidKey, cid);
}
} catch (error) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
}

var hostname = window.location.hostname;
var runtimeContext = /^(localhost|127\.|0\.0\.0\.0|::1)$/.test(hostname) ? 'local' : 'hosted';
var pageLocation = window.location.origin + window.location.pathname;
var params = new URLSearchParams({
v: '2',
tid: measurementId,
cid: cid,
en: 'demo_app_view',
'ep.repository': "module-federation-examples",
'ep.example': "advanced-api",
'ep.demo_path': "advanced-api/dynamic-remotes-runtime-environment-variables/remote/public",
'ep.entrypoint': "advanced-api/dynamic-remotes-runtime-environment-variables/remote/public/index.html",
'ep.runtime_context': runtimeContext,
dl: pageLocation,
dt: document.title || ('ModuleFederationExamples ' + "advanced-api/dynamic-remotes-runtime-environment-variables/remote/public")
});
new Image().src = 'https://www.google-analytics.com/g/collect?' + params.toString();
})();
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"start": "webpack-cli serve",
"build": "webpack --mode production",
"serve": "serve dist -p 3002",
"clean": "rm -rf dist"
"clean": "rm -rf dist",
"prestart": "node ../../../scripts/track-demo-run.js",
"preserve": "node ../../../scripts/track-demo-run.js"
},
"dependencies": {
"moment": "^2.30.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,40 @@
<script>
window.app2Url = 'http://localhost:3002';
</script>
<!-- Module Federation demo analytics -->
<script>
(function () {
var measurementId = "G-DRPXW0EEVT";
var cidKey = 'mf_examples_ga_cid';
var cid;
try {
cid = window.localStorage && window.localStorage.getItem(cidKey);
if (!cid) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
window.localStorage && window.localStorage.setItem(cidKey, cid);
}
} catch (error) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
}

var hostname = window.location.hostname;
var runtimeContext = /^(localhost|127\.|0\.0\.0\.0|::1)$/.test(hostname) ? 'local' : 'hosted';
var pageLocation = window.location.origin + window.location.pathname;
var params = new URLSearchParams({
v: '2',
tid: measurementId,
cid: cid,
en: 'demo_app_view',
'ep.repository': "module-federation-examples",
'ep.example': "advanced-api",
'ep.demo_path': "advanced-api/dynamic-remotes-synchronous-imports/app1/public",
'ep.entrypoint': "advanced-api/dynamic-remotes-synchronous-imports/app1/public/index.html",
'ep.runtime_context': runtimeContext,
dl: pageLocation,
dt: document.title || ('ModuleFederationExamples ' + "advanced-api/dynamic-remotes-synchronous-imports/app1/public")
});
new Image().src = 'https://www.google-analytics.com/g/collect?' + params.toString();
})();
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"start": "webpack-cli serve",
"build": "webpack --mode production",
"serve": "serve dist -p 3003",
"clean": "rm -rf dist"
"clean": "rm -rf dist",
"prestart": "node ../../../scripts/track-demo-run.js",
"preserve": "node ../../../scripts/track-demo-run.js"
},
"dependencies": {
"moment": "^2.30.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
<html>
<body>
<div id="root"></div>
<!-- Module Federation demo analytics -->
<script>
(function () {
var measurementId = "G-DRPXW0EEVT";
var cidKey = 'mf_examples_ga_cid';
var cid;
try {
cid = window.localStorage && window.localStorage.getItem(cidKey);
if (!cid) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
window.localStorage && window.localStorage.setItem(cidKey, cid);
}
} catch (error) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
}

var hostname = window.location.hostname;
var runtimeContext = /^(localhost|127\.|0\.0\.0\.0|::1)$/.test(hostname) ? 'local' : 'hosted';
var pageLocation = window.location.origin + window.location.pathname;
var params = new URLSearchParams({
v: '2',
tid: measurementId,
cid: cid,
en: 'demo_app_view',
'ep.repository': "module-federation-examples",
'ep.example': "advanced-api",
'ep.demo_path': "advanced-api/dynamic-remotes-synchronous-imports/app2/public",
'ep.entrypoint': "advanced-api/dynamic-remotes-synchronous-imports/app2/public/index.html",
'ep.runtime_context': runtimeContext,
dl: pageLocation,
dt: document.title || ('ModuleFederationExamples ' + "advanced-api/dynamic-remotes-synchronous-imports/app2/public")
});
new Image().src = 'https://www.google-analytics.com/g/collect?' + params.toString();
})();
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"serve": "pnpm --filter dynamic-remotes-synchronous-imports_app* --parallel serve",
"clean": "pnpm --filter dynamic-remotes-synchronous-imports_app* --parallel clean",
"e2e:ci": "pnpm exec playwright test",
"legacy:e2e:ci": "pnpm exec playwright test"
"legacy:e2e:ci": "pnpm exec playwright test",
"prestart": "node ../../scripts/track-demo-run.js",
"preserve": "node ../../scripts/track-demo-run.js"
},
"devDependencies": {
"@playwright/test": "1.58.2",
Expand Down
4 changes: 3 additions & 1 deletion advanced-api/dynamic-remotes/app1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"legacy:start": "webpack-cli serve",
"legacy:build": "webpack --mode production",
"serve": "serve dist -p 3001",
"clean": "rm -rf dist"
"clean": "rm -rf dist",
"prestart": "node ../../../scripts/track-demo-run.js",
"preserve": "node ../../../scripts/track-demo-run.js"
},
"dependencies": {
"react": "^18.3.1",
Expand Down
35 changes: 35 additions & 0 deletions advanced-api/dynamic-remotes/app1/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,40 @@
<head></head>
<body>
<div id="root"></div>
<!-- Module Federation demo analytics -->
<script>
(function () {
var measurementId = "G-DRPXW0EEVT";
var cidKey = 'mf_examples_ga_cid';
var cid;
try {
cid = window.localStorage && window.localStorage.getItem(cidKey);
if (!cid) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
window.localStorage && window.localStorage.setItem(cidKey, cid);
}
} catch (error) {
cid = String(Math.floor(Math.random() * 1000000000)) + '.' + String(Date.now());
}

var hostname = window.location.hostname;
var runtimeContext = /^(localhost|127\.|0\.0\.0\.0|::1)$/.test(hostname) ? 'local' : 'hosted';
var pageLocation = window.location.origin + window.location.pathname;
var params = new URLSearchParams({
v: '2',
tid: measurementId,
cid: cid,
en: 'demo_app_view',
'ep.repository': "module-federation-examples",
'ep.example': "advanced-api",
'ep.demo_path': "advanced-api/dynamic-remotes/app1/public",
'ep.entrypoint': "advanced-api/dynamic-remotes/app1/public/index.html",
'ep.runtime_context': runtimeContext,
dl: pageLocation,
dt: document.title || ('ModuleFederationExamples ' + "advanced-api/dynamic-remotes/app1/public")
});
new Image().src = 'https://www.google-analytics.com/g/collect?' + params.toString();
})();
</script>
</body>
</html>
Loading
Loading