diff --git a/.changeset/mighty-melons-walk.md b/.changeset/mighty-melons-walk.md new file mode 100644 index 000000000000..35e8447ba975 --- /dev/null +++ b/.changeset/mighty-melons-walk.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/adapter-vercel': patch +--- + +Add sourcemap generation for the generated functions diff --git a/packages/adapter-vercel/index.js b/packages/adapter-vercel/index.js index ea8a6fac8e8b..c893881eff77 100644 --- a/packages/adapter-vercel/index.js +++ b/packages/adapter-vercel/index.js @@ -146,7 +146,8 @@ async function v1(builder, external) { bundle: true, platform: 'node', external, - format: 'cjs' + format: 'cjs', + sourcemap: 'linked' }); fs.writeFileSync(`${dirs.lambda}/package.json`, JSON.stringify({ type: 'commonjs' })); @@ -302,7 +303,8 @@ async function v3(builder, external, edge, split) { bundle: true, platform: 'node', format: 'esm', - external + external, + sourcemap: 'linked' }); write(