Vendored Augani/openreel-video (MIT) into services/editor and wired it to the MAM. Editor runs as its own container on port 47435. Library assets pull in via ?asset=<uuid>; render exports route back via POST /api/v1/upload/simple. Sidebar Editor link on every page; Edit button on every preview modal. See services/editor/INTEGRATION.md for the patch map.
54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "path";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
assetsInclude: ["**/*.wasm"],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
"@openreel/core": path.resolve(__dirname, "../../packages/core/src"),
|
|
},
|
|
},
|
|
worker: {
|
|
format: "es",
|
|
},
|
|
optimizeDeps: {
|
|
exclude: ["@ffmpeg/ffmpeg", "@ffmpeg/util", "@ffmpeg/core", "@ffmpeg/core-mt"],
|
|
},
|
|
build: {
|
|
target: "esnext",
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: (id) => {
|
|
if (id.includes("node_modules/react") || id.includes("node_modules/react-dom")) {
|
|
return "react";
|
|
}
|
|
if (id.includes("node_modules/zustand")) {
|
|
return "zustand";
|
|
}
|
|
if (id.includes("node_modules/three")) {
|
|
return "three";
|
|
}
|
|
if (id.includes("node_modules/@radix-ui")) {
|
|
return "radix";
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
headers: {
|
|
"Cross-Origin-Opener-Policy": "same-origin",
|
|
"Cross-Origin-Embedder-Policy": "require-corp",
|
|
},
|
|
},
|
|
preview: {
|
|
headers: {
|
|
"Cross-Origin-Opener-Policy": "same-origin",
|
|
"Cross-Origin-Embedder-Policy": "require-corp",
|
|
},
|
|
},
|
|
});
|