feat: detect env var prefix + imports in react#13
Merged
Conversation
joshsny
added a commit
that referenced
this pull request
Apr 15, 2025
* feat(wip): react setup * fix: add back some changes from merge * feat(wip): pulling out nextjs * feat(wip): pull out nextjs internals * chore: remove posthog-js / posthog-node from package.json * feat(wip): react support * chore: ditch semver on react-version * chore: lint * chore: specify to use '.js' for next config * Naive addition of cursor rules * Only install cursor rules if we're running in a cursor session * chore: fix analytics, add back empty next config in example app * 0.2.11 * fix: add react option when not detected * 0.3.0 * chore: initial action for publishing on a new version (#10) * chore: basic publishing workflow * chore: add husky * fix: formatting on docs * fix: skip install test for now * fix: linter issues * Update readme for react (#11) * chore: basic publishing workflow * chore: add husky * fix: formatting on docs * fix: skip install test for now * fix: linter issues * chore: update readme * chore: add tracking for current integration (#12) * feat: detect env var prefix + imports in react (#13) * feat(wip): detect env var prefix * feat: env var detection * chore: formatting * chore: update vite imports, move cra file * fix: formatting * chore: add a tanstack test app * fix: formatting * 0.4.0 * 0.4.1 * Rework the rules structure * Adopt new rules structure * Naive addition of cursor rules * Rework the rules structure * Extract rules function for any integration to call * Finish dealing with merge * Store source rules as .md so Cursor doesn’t mangle their frontmatter * Lead with the more correct TS approach then degrade to JS, otherwise the robot will ignore * chore: run prettier, add integration tracking, trace step * chore: formatting * chore: add some tests * chore: formatting * chore: rename to editor rules for future editor support * chore: ask user if they want rules, default to true * 0.4.2 * 0.5.0 * fix: update postbuild * fix: clack select in tests --------- Co-authored-by: Joshua Snyder <joshua@posthog.com>
daniloc
pushed a commit
that referenced
this pull request
Oct 27, 2025
* feat(wip): detect env var prefix * feat: env var detection * chore: formatting * chore: update vite imports, move cra file * fix: formatting * chore: add a tanstack test app * fix: formatting
daniloc
added a commit
that referenced
this pull request
Oct 27, 2025
* feat(wip): react setup * fix: add back some changes from merge * feat(wip): pulling out nextjs * feat(wip): pull out nextjs internals * chore: remove posthog-js / posthog-node from package.json * feat(wip): react support * chore: ditch semver on react-version * chore: lint * chore: specify to use '.js' for next config * Naive addition of cursor rules * Only install cursor rules if we're running in a cursor session * chore: fix analytics, add back empty next config in example app * 0.2.11 * fix: add react option when not detected * 0.3.0 * chore: initial action for publishing on a new version (#10) * chore: basic publishing workflow * chore: add husky * fix: formatting on docs * fix: skip install test for now * fix: linter issues * Update readme for react (#11) * chore: basic publishing workflow * chore: add husky * fix: formatting on docs * fix: skip install test for now * fix: linter issues * chore: update readme * chore: add tracking for current integration (#12) * feat: detect env var prefix + imports in react (#13) * feat(wip): detect env var prefix * feat: env var detection * chore: formatting * chore: update vite imports, move cra file * fix: formatting * chore: add a tanstack test app * fix: formatting * 0.4.0 * 0.4.1 * Rework the rules structure * Adopt new rules structure * Naive addition of cursor rules * Rework the rules structure * Extract rules function for any integration to call * Finish dealing with merge * Store source rules as .md so Cursor doesn’t mangle their frontmatter * Lead with the more correct TS approach then degrade to JS, otherwise the robot will ignore * chore: run prettier, add integration tracking, trace step * chore: formatting * chore: add some tests * chore: formatting * chore: rename to editor rules for future editor support * chore: ask user if they want rules, default to true * 0.4.2 * 0.5.0 * fix: update postbuild * fix: clack select in tests --------- Co-authored-by: Joshua Snyder <joshua@posthog.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
React has a lot of frameworks, we should do our best to name env vars correctly and import them in the right way.
This adds examples for VITE, and correctly names environment variables for a number of frameworks.
The heavier SSR frameworks like tanstack start should have their own docs.