-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathastro.config.mjs
39 lines (34 loc) · 976 Bytes
/
astro.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { defineConfig } from "astro/config";
import * as path from "path";
// https://astro.build/config
import tailwind from "@astrojs/tailwind";
// https://astro.build/config
import react from "@astrojs/react";
// https://astro.build/config
export default defineConfig({
integrations: [tailwind(), react()],
site: "https://gear-4327.web.app/",
server: { port: 4327, host: true },
vite: {
plugins: [mediapipe_workaround()],
},
});
// mediapipe workaround
function mediapipe_workaround() {
return {
name: "mediapipe_workaround",
load(id) {
if (path.basename(id) === "holistic.js") {
let code = fs.readFileSync(id, "utf-8");
code += "exports.Holistic = Holistic;";
return { code };
} else if (path.basename(id) === "camera_utils.js") {
let code = fs.readFileSync(id, "utf-8");
code += "exports.Camera = Camera;";
return { code };
} else {
return null;
}
},
};
}