fix
This commit is contained in:
parent
7cc7b7d099
commit
06a8d6e482
|
|
@ -1,15 +1,11 @@
|
||||||
import { parseFile } from "@swc/core";
|
|
||||||
import { dir } from "dir";
|
import { dir } from "dir";
|
||||||
import { apiContext } from "service-srv";
|
import { apiContext } from "service-srv";
|
||||||
import { validate } from "uuid";
|
import { validate } from "uuid";
|
||||||
|
import { parseTypeDef } from "../util/parse-type-def";
|
||||||
import { prodIndex } from "../util/prod-index";
|
import { prodIndex } from "../util/prod-index";
|
||||||
import { code } from "../ws/sync/code/code";
|
import { code } from "../ws/sync/code/code";
|
||||||
import { initFrontEnd } from "../ws/sync/code/parts/init/frontend";
|
import { initFrontEnd } from "../ws/sync/code/parts/init/frontend";
|
||||||
import { gzipAsync } from "../ws/sync/entity/zlib";
|
import { gzipAsync } from "../ws/sync/entity/zlib";
|
||||||
import { visit } from "woodpile";
|
|
||||||
import { parseTypeDef } from "../util/parse-type-def";
|
|
||||||
import { Glob, build } from "bun";
|
|
||||||
import { removeAsync } from "fs-jetpack";
|
|
||||||
|
|
||||||
export const _ = {
|
export const _ = {
|
||||||
url: "/prod/:site_id/**",
|
url: "/prod/:site_id/**",
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -2,6 +2,7 @@ import { createId } from "@paralleldrive/cuid2";
|
||||||
import brotliPromise from "brotli-wasm";
|
import brotliPromise from "brotli-wasm";
|
||||||
import { Glob, spawn } from "bun";
|
import { Glob, spawn } from "bun";
|
||||||
import { dir } from "dir";
|
import { dir } from "dir";
|
||||||
|
import { build, context } from "esbuild";
|
||||||
import { fdir } from "fdir";
|
import { fdir } from "fdir";
|
||||||
import { statSync } from "fs";
|
import { statSync } from "fs";
|
||||||
import {
|
import {
|
||||||
|
|
@ -13,6 +14,22 @@ import {
|
||||||
} from "fs-jetpack";
|
} from "fs-jetpack";
|
||||||
const brotli = await brotliPromise;
|
const brotli = await brotliPromise;
|
||||||
|
|
||||||
|
await build({
|
||||||
|
bundle: true,
|
||||||
|
absWorkingDir: dir.path(""),
|
||||||
|
entryPoints: [dir.path("app/web/src/nova/prod/main.tsx")],
|
||||||
|
outdir: dir.path(`/app/srv/core`),
|
||||||
|
splitting: true,
|
||||||
|
format: "esm",
|
||||||
|
jsx: "transform",
|
||||||
|
minify: true,
|
||||||
|
sourcemap: true,
|
||||||
|
logLevel: "error",
|
||||||
|
define: {
|
||||||
|
"process.env.NODE_ENV": `"production"`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const glob = new Glob("**");
|
const glob = new Glob("**");
|
||||||
const public_files = [] as string[];
|
const public_files = [] as string[];
|
||||||
for await (const file of glob.scan(dir.path("app/web/public"))) {
|
for await (const file of glob.scan(dir.path("app/web/public"))) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue