📺 finlizes routing and improves bs

This commit is contained in:
2026-05-22 15:56:44 +02:00
parent c3782509e8
commit 8bb12aaac1
25 changed files with 277 additions and 88 deletions
+7 -3
View File
@@ -3,14 +3,18 @@
/** Use Hot Module replacement by adding --watch to the start command */
//const hmr = process.argv.includes("--watch");
const [ mode ] = process.argv.slice(2);
import { paths } from "./bs/dev/paths.js";
import { join } from "node:path";
const pathDist = join.bind(null, paths.dist);
const target = mode !== "dist" // OR "src"
? {
rootDir: ".",
appIndex: "./index.html",
appIndex: "index.html",
}
: {
rootDir: "./dist",
appIndex: "./dist/index.html",
rootDir: pathDist(),
appIndex: pathDist("index.html"),
};
export default /** @type {import("@web/dev-server").DevServerConfig} */ ({