Skip to content

Commit

Permalink
Libs/JS: Publish src to npm to make it available for source maps (#1396)
Browse files Browse the repository at this point in the history
## Motivation
We export source maps with the `svix` javascript package, but not the
corresponding source files.

Something like
`{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[].....`
in `index.js.map` throws an error since `../src/index.ts` can't be
found. This causes several warnings in certain bundlers.
 
## Solution
Add the source files to the files published to npm. 

Closes #1299
  • Loading branch information
svix-lucho authored Aug 7, 2024
1 parent d8e10a0 commit a508405
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"files": [
"dist/**/*"
"src",
"dist"
],
"scripts": {
"build": "tsc",
Expand Down Expand Up @@ -46,4 +47,4 @@
"ts-jest": "^27.0.3",
"typescript": "^3.9.3"
}
}
}

0 comments on commit a508405

Please sign in to comment.