Fix ems build

This commit is contained in:
Fang-Pen Lin
2025-11-17 16:54:26 -08:00
parent df395076f9
commit 0edf3c8b15
2 changed files with 3 additions and 7 deletions

View File

@@ -25,7 +25,7 @@
"baseUrl": ".",
"paths": {
"@app/*": ["./src/*"],
"@bdd_routes/bdd-nock-router": ["./src/server/routes/bdd/bdd-nock-router.ts"]
"@bdd_routes/*": ["./src/server/routes/bdd/*"]
},
"jsx": "react-jsx"
},

View File

@@ -29,7 +29,7 @@ export default defineConfig({
external: ["../../../frontend/node_modules/next/dist/server/next-server.js"],
outDir: "dist",
tsconfig: "./tsconfig.json",
entry: ["./src"],
entry: ["./src", "!./src/**/*.dev.ts"],
sourceMap: true,
skipNodeModulesBundle: true,
esbuildPlugins: [
@@ -45,11 +45,7 @@ export default defineConfig({
const isRelativePath = args.path.startsWith(".");
const absPath = isRelativePath
? path.join(args.resolveDir, args.path)
: path.join(
args.path
.replace("@app", "./src")
.replace("@bdd_routes/bdd-nock-router", "./src/server/routes/bdd/bdd-nock-router.ts")
);
: path.join(args.path.replace("@app", "./src").replace("@bdd_routes", "./src/server/routes/bdd"));
const isFile = await fs
.stat(`${absPath}.ts`)