diff --git a/.changeset/young-pants-buy.md b/.changeset/young-pants-buy.md new file mode 100644 index 00000000000..264afa56f28 --- /dev/null +++ b/.changeset/young-pants-buy.md @@ -0,0 +1,7 @@ +--- +"@remix-run/dev": major +--- + +Compile server build to Node 18. + +This allows features like top-level `await` to be used within a Remix app. diff --git a/packages/remix-dev/compiler/server/compiler.ts b/packages/remix-dev/compiler/server/compiler.ts index 3280b32092d..1fbfd76ae9c 100644 --- a/packages/remix-dev/compiler/server/compiler.ts +++ b/packages/remix-dev/compiler/server/compiler.ts @@ -88,7 +88,7 @@ const createEsbuildConfig = ( minifySyntax: true, minify: ctx.options.mode === "production" && ctx.config.serverMinify, mainFields: ctx.config.serverMainFields, - target: "node14", + target: "node18", loader: loaders, bundle: true, logLevel: "silent",