wrangler pages functions build ./functions --sourcemap --compatibility-flags=nodejs_compat --outdir=./dist-functions/index.js + index.js.map_worker.js + worker.js.map_worker.js + worker.js.map?3.28.2--outfile option instead of --outdir , but in this case the sourcemap stops generating.