mirror of
https://github.com/BillyOutlast/posthog.com.git
synced 2026-02-06 04:11:22 +01:00
* add docs * polish * Tweaks --------- Co-authored-by: Vincent (Wen Yu) Ge <gewenyu99@gmail.com>
56 lines
1.4 KiB
Plaintext
56 lines
1.4 KiB
Plaintext
---
|
|
title: Upload source maps with CLI
|
|
showStepsToc: true
|
|
---
|
|
|
|
import CLIDownload from "../_snippets/cli/download.mdx"
|
|
import CLIAuthenticate from "../_snippets/cli/authenticate.mdx"
|
|
import CLIInject from "../_snippets/cli/inject.mdx"
|
|
import CLIUpload from "../_snippets/cli/upload.mdx"
|
|
import StepVerifySourceMapUpload from './_snippets/step-verify-source-map-upload.mdx'
|
|
|
|
|
|
<Steps>
|
|
|
|
<Step title="Download CLI" badge="required">
|
|
|
|
<CLIDownload/>
|
|
|
|
</Step>
|
|
|
|
<Step title="Authenticate" badge="required">
|
|
|
|
<CLIAuthenticate />
|
|
|
|
</Step>
|
|
|
|
<Step title="Inject" badge="required">
|
|
|
|
Once you've built your application and have bundled assets, inject the context required by PostHog to associate the maps with the served code.
|
|
|
|
<CLIInject />
|
|
|
|
You can verify that the metadata has been injected by checking for the `//# chunkId=...` comment in the minified code.
|
|
|
|
</Step>
|
|
|
|
<Step title="Upload" badge="required">
|
|
|
|
You will then need to upload the modified assets to PostHog.
|
|
|
|
<CLIUpload path="./path/to/assets" />
|
|
|
|
</Step>
|
|
|
|
<Step title="Serve injected assets" badge="required">
|
|
|
|
You *must* serve the injected assets in deployed production app. The injected metadata is used during error capture to identify the correct source map to use.
|
|
|
|
If you serve a copy of the bundled assets as they were prior to running `posthog-cli sourcemap inject`, we won't be able to use the uploaded sourcemap to unminify or demangle your stack traces.
|
|
|
|
</Step>
|
|
|
|
<StepVerifySourceMapUpload />
|
|
|
|
</Steps>
|