Add upload option to sourcemaps config#2918
Conversation
|
@joeriddles is attempting to deploy a commit to the PostHog Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Additional Comments (3)
-
packages/rollup-plugin/src/index.ts, line 89-94 (link)logic:
deleteAfterUploadandbatchSizeonly apply when uploading - these checks should be inside theif (posthogOptions.sourcemaps.upload)block, sincesourcemap injectdoesn't support these flags -
packages/webpack-plugin/src/index.ts, line 87-93 (link)logic:
deleteAfterUploadandbatchSizeonly apply when uploading - these checks should be inside theif (config.sourcemaps.upload)block, sincesourcemap injectdoesn't support these flags -
packages/nextjs-config/src/utils.ts, line 38-44 (link)logic:
deleteAfterUploadandbatchSizeonly apply when uploading - these checks should be inside theif (posthogOptions.sourcemaps.upload)block, sincesourcemap injectdoesn't support these flags
4 files reviewed, 8 comments
There was a problem hiding this comment.
Additional Comments (2)
-
packages/webpack-plugin/src/index.ts, line 87-93 (link)syntax: wrap these checks in
if (config.sourcemaps.upload)conditional - whenuploadis false,deleteAfterUploadandbatchSizedon't exist on the discriminated union type -
packages/nextjs-config/src/utils.ts, line 37-43 (link)syntax: wrap these checks in
if (posthogOptions.sourcemaps.upload)conditional - whenuploadis false,deleteAfterUploadandbatchSizedon't exist on the discriminated union type
4 files reviewed, 2 comments
|
I'm having a hard time testing this in a separate project with my forked branch. I didn't see any advice in CONTRIBUTING.md for testing forked versions of this repo. I'm running into issues since the internal packages use |
| @@ -15,7 +15,15 @@ export function hasCompilerHook(): boolean { | |||
|
|
|||
There was a problem hiding this comment.
@joeriddles Just to be sure to understand the use case, do you want to build once and upload sourcemaps in multiple environments in parallel ? What is the workflow you want to achieve ?
There was a problem hiding this comment.
Do you have any errors when you run 'pnpm install' in the workspace ?
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
Problem
People who want to upload source maps to PostHog in a separate CI workflow than their build process.
Source map uploading is slow and can be ran parallel in a separate workflow.
Changes
Add
uploadoption to the Next.js/Rollup/Webpacksourcemapsconfig. When false,posthog-cli sourcemap injectis used. When true (default),@posthog/cli sourcemap processis used, which injects and uploads.Release info Sub-libraries affected
Libraries affected
Checklist
If releasing new changes
pnpm changesetto generate a changeset file