Upload source maps
At the end every build uploads its source maps, and a minified stack trace resolves to your code.
Before you start
@vinktarhq/cli (npm). For minified JavaScript and TypeScript builds: uploads source maps so a stack trace resolves to your code.
You need a key with the cli scope, from project settings. It is used at build time only and never goes in a bundle.
1. Install
npm install --save-dev @vinktarhq/cli2. Set the key and upload
# A key with the cli scope, from project settings. Build-time only, never in a bundle.
export VINKTAR_CLI_KEY=vnk_sk_...
# vite.config.ts: stamps, uploads and removes the maps on every build
# import { vinktar } from '@vinktarhq/cli/vite'
# export default defineConfig({ plugins: [vinktar()] })
# (also @vinktarhq/cli/rollup, /webpack, /rspack, /esbuild)
# or after any build:
npx @vinktarhq/cli sourcemaps upload ./dist --release web@1.0.0Check it worked
The release must match the one the SDK reports. npx @vinktarhq/cli doctor says which of key, scope or host is wrong.