Skip to content

Commit

Permalink
feat: adapter-vercel should generate sourcemaps (#5197)
Browse files Browse the repository at this point in the history
* feat: enable sourcemap support

The adapter-vercel package were not generating sourcemaps. Therefore, it was impossible to correctly use any bug tracking tool.

* fix: add missing changeset

* style: fix README.md indentation

* fix: always generate linked sourcemaps and delete configuration option
  • Loading branch information
ACHP authored Jun 24, 2022
1 parent 1df2612 commit c399840
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/mighty-melons-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-vercel': patch
---

Add sourcemap generation for the generated functions
6 changes: 4 additions & 2 deletions packages/adapter-vercel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' }));
Expand Down Expand Up @@ -302,7 +303,8 @@ async function v3(builder, external, edge, split) {
bundle: true,
platform: 'node',
format: 'esm',
external
external,
sourcemap: 'linked'
});

write(
Expand Down

0 comments on commit c399840

Please sign in to comment.