wip fix
This commit is contained in:
parent
7d76160943
commit
ff6efc0518
|
|
@ -59,7 +59,7 @@ export const _ = {
|
|||
code.path(site_id, "server", "build")
|
||||
),
|
||||
site: readDirectoryRecursively(code.path(site_id, "site", "build")),
|
||||
core: readDirectoryRecursively(dir.path(`/app/srv/prod`)),
|
||||
core: readDirectoryRecursively(dir.path(`/app/srv/core`)),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ export const _ = {
|
|||
} else if (pathname === "index.html" || pathname === "_") {
|
||||
return index_html;
|
||||
} else {
|
||||
const res = dir.path(`/app/srv/prod/${pathname}`);
|
||||
const res = dir.path(`/app/srv/core/${pathname}`);
|
||||
const file = Bun.file(res);
|
||||
if (!(await file.exists())) {
|
||||
return index_html;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -23,7 +23,9 @@ export const base = {
|
|||
}
|
||||
},
|
||||
get pathname() {
|
||||
return location.pathname.substring(base.root.pathname.length);
|
||||
const res = location.pathname.substring(base.root.pathname.length);
|
||||
if (!res.startsWith("/")) return `/${res}`;
|
||||
return res;
|
||||
},
|
||||
site: { id: w._prasi?.site_id } as {
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export const Root = () => {
|
|||
const page = router.lookup(base.pathname);
|
||||
if (!page) return <DeadEnd>Page Not Found</DeadEnd>;
|
||||
|
||||
w.params = page.params;
|
||||
w.params = page.params || {};
|
||||
|
||||
base.page.id = page.id;
|
||||
base.page.url = page.url;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const ctx = await context({
|
|||
bundle: true,
|
||||
absWorkingDir: dir.path(""),
|
||||
entryPoints: [dir.path("app/web/src/nova/prod/main.tsx")],
|
||||
outdir: dir.path(`/app/srv/prod`),
|
||||
outdir: dir.path(`/app/srv/core`),
|
||||
splitting: true,
|
||||
format: "esm",
|
||||
jsx: "transform",
|
||||
|
|
@ -71,6 +71,8 @@ if (!g.apiPrepared) {
|
|||
}
|
||||
}
|
||||
|
||||
if (g.mode === "dev") await import("./build-core");
|
||||
|
||||
if (!g.parcel) {
|
||||
await parcelBuild();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ if (!g.dockerPrepared) {
|
|||
},
|
||||
};
|
||||
|
||||
await import("./core/build-prod");
|
||||
|
||||
if (!(await existsAsync(dir.path("_tmp_docker")))) {
|
||||
for (const file of Object.keys(dir.read(dir.path``))) {
|
||||
if (
|
||||
|
|
|
|||
Loading…
Reference in New Issue