Skip to content

Commit 7fafb03

Browse files
feat: add MF Vite Angular example (#4293)
Co-authored-by: Zack Jackson <[email protected]>
1 parent 528ed7d commit 7fafb03

29 files changed

+6945
-0
lines changed
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
# Module federation temp files
27+
.__mf__temp
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# React host and remote
2+
3+
## Getting started
4+
5+
From this directory execute:
6+
7+
- npm run install:deps
8+
- npm run preview
9+
10+
Open your browser at http://localhost:5173/ to see the amazing result
11+
12+
![screenshot](docs/screenshot.png)
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
.__mf__temp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<link rel="stylesheet" href="/src/style.css" />
8+
<title>Host</title>
9+
</head>
10+
<body>
11+
<app-root></app-root>
12+
<script type="module" src="/src/main.ts"></script>
13+
</body>
14+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "module-federation-vite-angular-host",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite --port 5173",
8+
"build": "vite build",
9+
"preview": "vite preview --port 5173"
10+
},
11+
"dependencies": {
12+
"@angular/animations": "^18.0.0",
13+
"@angular/build": "^18.0.0",
14+
"@angular/common": "^18.0.0",
15+
"@angular/compiler": "^18.0.0",
16+
"@angular/core": "^18.0.0",
17+
"@angular/platform-browser": "^18.0.0",
18+
"@angular/platform-browser-dynamic": "^18.0.0",
19+
"@angular/platform-server": "^18.0.0",
20+
"@module-federation/vite": "1.1.2",
21+
"rxjs": "~7.8.0",
22+
"tslib": "^2.3.0",
23+
"zone.js": "~0.14.3"
24+
},
25+
"devDependencies": {
26+
"@analogjs/vite-plugin-angular": "^1.7.3",
27+
"@angular/build": "^18.0.0",
28+
"@angular/compiler-cli": "^18.0.0",
29+
"typescript": "5.4.5",
30+
"vite": "^5.4.1"
31+
}
32+
}

0 commit comments

Comments
 (0)