Source maps
See errors at src/checkout.ts:42 instead of index-3f9a2c.js:1:48213.
Set it up
Make an API key
In Organization settings → API keys, add a key with the Source maps preset. Add it to your CI or hosting build environment as DATABUDDY_API_KEY.
Add the plugin
Deploy
Builds with the key upload their maps and delete them, so they're never served. Builds without it, such as on your laptop, stay exactly as they were.
The website comes from the client ID your app already sets (NEXT_PUBLIC_DATABUDDY_CLIENT_ID, or VITE_DATABUDDY_CLIENT_ID including from .env). Set DATABUDDY_WEBSITE_ID if there's none.
Options
Unchanged maps aren't sent again, so uploading on every deploy is cheap. For your own scripts, uploadSourceMaps(dir) from @databuddy/sdk/sourcemaps is the same uploader.
Skip uploads if your website serves maps
When a file has no uploaded map, Databuddy reads the map its script points to (sourceMappingURL comment, SourceMap header or data: URL), only from your website's domain and subdomains. Uploading is still better: your code stays private, and old builds keep mapping after you deploy over them.
Who sees your code
Maps are stored privately with Tigris, never served or published, and deleted with their website or organization.
Limits
Related
How is this guide?