Skip to content

Commit

Permalink
feat: add MF Vite Solid example (#4292)
Browse files Browse the repository at this point in the history
Co-authored-by: Zack Jackson <[email protected]>
  • Loading branch information
gioboa and ScriptedAlchemy authored Oct 10, 2024
1 parent 024d07f commit 528ed7d
Show file tree
Hide file tree
Showing 22 changed files with 4,108 additions and 0 deletions.
12 changes: 12 additions & 0 deletions module-federation-vite-solid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Solid host and remote

## Getting started

From this directory execute:

- pnpm install:deps
- pnpm serve

Open your browser at http://localhost:4173/ to see the amazing result

![screenshot](docs/screenshot.png)
Binary file added module-federation-vite-solid/docs/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions module-federation-vite-solid/host/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
.__mf__temp
16 changes: 16 additions & 0 deletions module-federation-vite-solid/host/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico" />
<title>Host</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>

<script src="/src/index.tsx" type="module"></script>
</body>
</html>
22 changes: 22 additions & 0 deletions module-federation-vite-solid/host/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "module-federation-vite-solid-host",
"version": "0.0.0",
"description": "",
"scripts": {
"start": "vite",
"dev": "vite --port 4173",
"build": "vite build",
"preview": "vite preview --port 4173"
},
"license": "MIT",
"devDependencies": {
"solid-devtools": "^0.29.2",
"typescript": "^5.3.3",
"vite": "^5.0.11",
"vite-plugin-solid": "^2.8.2"
},
"dependencies": {
"@module-federation/vite": "^1.1.1",
"solid-js": "^1.8.11"
}
}
Loading

0 comments on commit 528ed7d

Please sign in to comment.