Skip to content

feat: detect env var prefix + imports in react#13

Merged
joshsny merged 7 commits intomainfrom
react-env-prefix
Apr 3, 2025
Merged

feat: detect env var prefix + imports in react#13
joshsny merged 7 commits intomainfrom
react-env-prefix

Conversation

@joshsny
Copy link
Collaborator

@joshsny joshsny commented Apr 3, 2025

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.

@joshsny joshsny merged commit 2f5e29d into main Apr 3, 2025
5 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant