generated from JfrAziz/remix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.ts
28 lines (27 loc) · 790 Bytes
/
server.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import esbuild from "esbuild"
/**
* if you want to see entry point
* of this project, go to `./api/index.ts`.
* this file just a builder for production
*/
esbuild
.build({
// The final file name
outfile: "build/server/index.js",
// Our server entry point
entryPoints: ["api/index.ts"],
// Dependencies that should not be bundled
// We import the remix build from "../build/server/remix.js", so no need to bundle it again
external: ["./build/server/*"],
platform: "node",
format: "esm",
// Don't include node_modules in the bundle
packages: "external",
bundle: true,
logLevel: "info",
})
.catch((error: unknown) => {
// biome-ignore lint/nursery/noConsole: show build error
console.error(error)
process.exit(1)
})