File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,21 @@ export const createEdgeHandlers = async (ctx: PluginContext) => {
273
273
await mkdir ( dirname ( dummyChunkPath ) , { recursive : true } )
274
274
await writeFile ( dummyChunkPath , '' )
275
275
276
+ // there is also `@opentelemetry/api` require that fails esbuild due to nothing matching,
277
+ // next is try/catching it and fallback to bundled version of otel package in case of errors
278
+ const otelApiPath = join (
279
+ fakeNodeModulePath ,
280
+ 'node_modules' ,
281
+ '@opentelemetry' ,
282
+ 'api' ,
283
+ 'index.js' ,
284
+ )
285
+ await mkdir ( dirname ( otelApiPath ) , { recursive : true } )
286
+ await writeFile (
287
+ otelApiPath ,
288
+ `throw new Error('this is dummy to satisfy esbuild used for npm compat using fake module')` ,
289
+ )
290
+
276
291
// await writeHandlerFile(ctx, definition)
277
292
278
293
const nextConfig = ctx . buildConfig
You can’t perform that action at this time.
0 commit comments