-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(server): try migrating to esbuild
This is currently not possible, since esbuild has no support for top level await when bundling to cjs. See evanw/esbuild#253
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import esbuild from "esbuild"; | ||
import graphqlLoaderPlugin from "@luckycatfactory/esbuild-graphql-loader"; | ||
console.log(graphqlLoaderPlugin); | ||
import { optimizeDocumentNode } from "@graphql-tools/optimize"; | ||
|
||
await esbuild.build({ | ||
entryPoints: ["./src/index.ts"], | ||
outdir: "./out", | ||
bundle: false, | ||
minify: true, | ||
platform: "node", | ||
target: "node18.19.1", | ||
packages: "external", | ||
plugins: [graphqlLoaderPlugin({ mapDocumentNode: optimizeDocumentNode })], | ||
}); |