⚡ 📺 finlizes routing and improves bs
This commit is contained in:
@@ -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} */ ({
|
||||
|
||||
Reference in New Issue
Block a user