Problem
miniflare's bundled dist/src/index.js.map contains sources entries that point to files outside the miniflare package directory — specifically into its nested node_modules dependencies (zod, capnp-es, acorn, chokidar, puppeteer/browsers, etc.).
In pnpm-based monorepos, these paths don't resolve because pnpm hoists dependencies to different locations than the paths baked into the sourcemap.
This produces dozens of warnings at runtime:
Sourcemap for ".../node_modules/miniflare/dist/src/index.js" points to a source file outside its package: ".../miniflare/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js"
Sourcemap for ".../node_modules/miniflare/dist/src/index.js" points to a source file outside its package: ".../miniflare/node_modules/.pnpm/capnp-es@0.0.14_typescript@5.8.3/node_modules/capnp-es/dist/index.mjs"
Sourcemap for ".../node_modules/miniflare/dist/src/index.js" points to a source file outside its package: ".../miniflare/node_modules/.pnpm/chokidar@4.0.1/node_modules/chokidar/src/index.ts"
Sourcemap for ".../node_modules/miniflare/dist/src/index.js" points to a source file outside its package: ".../miniflare/node_modules/.pnpm/@puppeteer+browsers@2.10.6/node_modules/@puppeteer/browsers/src/launch.ts"
... (30+ similar warnings)
Expected behavior
Either:
- Embed sources inline via
sourcesContent so external paths aren't needed, or
- Use relative paths that stay within the package boundary, or
- Exclude external dependency sources from the sourcemap
Environment
- miniflare@4.20260409.0
- pnpm@10.x monorepo
- @cloudflare/vitest-pool-workers@0.14.3
Problem
miniflare's bundled
dist/src/index.js.mapcontainssourcesentries that point to files outside the miniflare package directory — specifically into its nestednode_modulesdependencies (zod, capnp-es, acorn, chokidar, puppeteer/browsers, etc.).In pnpm-based monorepos, these paths don't resolve because pnpm hoists dependencies to different locations than the paths baked into the sourcemap.
This produces dozens of warnings at runtime:
Expected behavior
Either:
sourcesContentso external paths aren't needed, orEnvironment