Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: draft mode env vars not available #97

Closed
wants to merge 3 commits into from

Conversation

james-elicx
Copy link
Collaborator

Context

Draft mode tries to access certain environment variables in the edge runtime to be able to work. These variables are available in the prerender manifest and need to be injected into the worker some how.

fixes #94 (?)

Changes

  • Move prerender manifest retrieval to a utility.
  • Inject the preview mode config.
  • Add the draft mode env vars to process.env inside the worker.

Copy link

changeset-bot bot commented Oct 12, 2024

🦋 Changeset detected

Latest commit: fc118eb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@opennextjs/cloudflare Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@james-elicx james-elicx changed the title refactor: move prerender manifest retrieval to own utility fix: draft mode env vars not available Oct 12, 2024
Copy link

pkg-pr-new bot commented Oct 12, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/cloudflare@97

commit: fc118eb

@james-elicx james-elicx mentioned this pull request Oct 12, 2024
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.

Draft mode
1 participant