Skip to content

Commit

Permalink
Add a placeholder index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
gigincg committed Nov 25, 2024
1 parent 3e7ad11 commit 78eb622
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 17 deletions.
73 changes: 73 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CARE LiveKit Microfrontend</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.6;
max-width: 800px;
margin: 0 auto;
padding: 20px;
color: #333;
}
.container {
background-color: #f5f5f5;
border-radius: 8px;
padding: 20px;
margin-top: 40px;
}
h1 {
color: #2563eb;
margin-bottom: 20px;
}
.warning {
background-color: #fff3cd;
border: 1px solid #ffeeba;
border-radius: 4px;
padding: 15px;
margin: 20px 0;
}
.link {
color: #2563eb;
text-decoration: none;
}
.link:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<h1>CARE LiveKit Microfrontend</h1>

<div class="warning">
⚠️ This is a microfrontend module and cannot be used as a standalone application.
</div>

<p>
This repository contains the LiveKit video conferencing microfrontend for the CARE platform.
It is designed to be integrated with the main CARE application.
</p>

<p>
To use this module, please visit the main CARE application at
<a href="https://github.com/ohcnetwork/care_fe" class="link">github.com/ohcnetwork/care_fe</a>
</p>

<h2>Technical Details</h2>
<p>
This microfrontend is built using:
<ul>
<li>Vite</li>
<li>Module Federation</li>
<li>LiveKit SDK</li>
<li>React</li>
<li>TypeScript</li>
</ul>
</p>
</div>
</body>
</html>
26 changes: 9 additions & 17 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { defineConfig } from "vite";
import federation from "@originjs/vite-plugin-federation";
import react from "@vitejs/plugin-react";
import { fileURLToPath } from "url";
import { dirname, resolve } from "path";
import path from "path";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// Use Node's path module instead of URL
const __dirname = path.resolve();

export default defineConfig({
base: "/care_livekit_fe/",
Expand All @@ -20,18 +19,7 @@ export default defineConfig({
name: "CareLivekit",
},
},
shared: {
react: {
singleton: true,
requiredVersion: "^18.0.0",
eager: true,
},
"react-dom": {
singleton: true,
requiredVersion: "^18.0.0",
eager: true,
},
},
shared: ["react", "react-dom"],
}),
],
build: {
Expand All @@ -43,7 +31,11 @@ export default defineConfig({
rollupOptions: {
preserveEntrySignatures: "strict",
input: {
"care-livekit": resolve(__dirname, "src/components/CareLivekit.tsx"),
index: path.resolve(__dirname, "index.html"),
"care-livekit": path.resolve(
__dirname,
"src/components/CareLivekit.tsx"
),
},
output: {
format: "esm",
Expand Down

0 comments on commit 78eb622

Please sign in to comment.