Build photo.html with vite
This commit is contained in:
parent
4ab15ab61a
commit
ad028bc522
2 changed files with 45 additions and 34 deletions
|
|
@ -137,8 +137,7 @@
|
||||||
flip.setAttribute("href", `?facing=${facingOpposite}`);
|
flip.setAttribute("href", `?facing=${facingOpposite}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
await initStream(facing);
|
initStream(facing).then(() => {
|
||||||
|
|
||||||
async function waitAtLeast(duration, since) {
|
async function waitAtLeast(duration, since) {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
const wait = duration - (now - since);
|
const wait = duration - (now - since);
|
||||||
|
|
@ -172,6 +171,7 @@
|
||||||
cover.classList.add("hidden");
|
cover.classList.add("hidden");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
@ -1,14 +1,25 @@
|
||||||
import vue from "@vitejs/plugin-vue";
|
import vue from "@vitejs/plugin-vue";
|
||||||
import { fileURLToPath, URL } from "node:url";
|
import { dirname, resolve } from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import vueDevTools from "vite-plugin-vue-devtools";
|
import vueDevTools from "vite-plugin-vue-devtools";
|
||||||
|
|
||||||
|
const root = dirname(fileURLToPath(import.meta.url));
|
||||||
|
function path(to: string): string {
|
||||||
|
return resolve(root, to);
|
||||||
|
}
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [vue(), vueDevTools()],
|
plugins: [vue(), vueDevTools()],
|
||||||
base: "",
|
base: "",
|
||||||
|
build: {
|
||||||
|
rollupOptions: {
|
||||||
|
input: [path("index.html"), path("photo.html")],
|
||||||
|
},
|
||||||
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) },
|
alias: { "@": path("src") },
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
proxy: { "/api": "http://localhost:8080" },
|
proxy: { "/api": "http://localhost:8080" },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue