netlify/remix-compute

Move away from deprecated serverBuildTarget for Netlify Edge Functions default Remix configuration

Closed this issue · 0 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem
is. Ex. I'm always frustrated when [...]

serverBuildTarget in the Remix configuration has been deprecated. See https://github.com/remix-run/remix/pull/4841/files

Describe the solution you'd like A clear and concise description of what you want to happen.

Move to the new settings that replace serverBuildTarget

import type { AppConfig } from '@remix-run/dev'

export const config: AppConfig = {
-  serverBuildTarget: 'deno',
  server: './server.js',
  ignoredRouteFiles: ['**/.*'],
  serverBuildPath: '.netlify/edge-functions/server.js',
+  serverConditions: ['deno', 'worker'],
+  serverDependenciesToBundle: 'all',
+  serverMainFields: ['module', 'main'],
  serverModuleFormat: 'esm',
  serverPlatform: 'neutral',
  // See https://remix.run/docs/en/main/file-conventions/route-files-v2
  future: {
    v2_routeConvention: true,
  },
}

Describe alternatives you've considered A clear and concise description of any alternative solutions or features
you've considered.

N/A

Additional context Add any other context or screenshots about the feature request here.