File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ export function defineCloudflareConfig(config: CloudflareOverrides = {}): OpenNe
9090 edgeExternals : [ "node:crypto" ] ,
9191 cloudflare : {
9292 useWorkerdCondition : true ,
93+ sourcemap : false ,
9394 } ,
9495 dangerous : {
9596 enableCacheInterception,
@@ -154,6 +155,14 @@ interface OpenNextConfig extends AwsOpenNextConfig {
154155 */
155156 useWorkerdCondition ?: boolean ;
156157
158+ /**
159+ * Whether to genereate a sourcemap for the bundled server.
160+ *
161+ *
162+ * @default false
163+ */
164+ sourcemap ?: boolean ;
165+
157166 /**
158167 * Disable throwing an error when the config validation fails.
159168 * This is useful for overriding some of the default provided by cloudflare.
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
8181 minifySyntax : ! debug ,
8282 legalComments : "none" ,
8383 metafile : true ,
84+ sourcemap : getOpenNextConfig ( buildOpts ) . cloudflare ?. sourcemap ,
8485 // Next traces files using the default conditions from `nft` (`node`, `require`, `import` and `default`)
8586 //
8687 // Because we use the `node` platform for this build, the "module" condition is used when no conditions are defined.
You can’t perform that action at this time.
0 commit comments