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

add defineCloudflareConfig utility #412

Merged
merged 23 commits into from
Feb 27, 2025
Merged

add defineCloudflareConfig utility #412

merged 23 commits into from
Feb 27, 2025

Conversation

dario-piotrowicz
Copy link
Contributor

@dario-piotrowicz dario-piotrowicz commented Feb 25, 2025

this change adds a new defineCloudflareConfig utility that developers can use in their open-next.config.ts file to easily generate a configuration compatible with the adapter


Docs PR: opennextjs/docs#84


resolves #114

Copy link

changeset-bot bot commented Feb 25, 2025

🦋 Changeset detected

Latest commit: 53e43d2

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

Copy link

pkg-pr-new bot commented Feb 25, 2025

Open in Stackblitz

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

commit: 53e43d2

@dario-piotrowicz
Copy link
Contributor Author

@conico974 what I'm doing here is very close to withCloudflare but this defineConfig is more restricted/focused on just our adapter, while as far as I can tell withCloudflare is much more flexible.

Do you think that this API makes sense? or do you think that we should try to align things more?

Copy link
Collaborator

@conico974 conico974 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just few nit

Do you think that this API makes sense? or do you think that we should try to align things more?

Yeah i think it makes perfect sense, this is enough. If people needs more complex options they can just provide their own open-next.config.ts

@dario-piotrowicz dario-piotrowicz changed the title add defineConfig utility add defineCloudflareConfig utility Feb 26, 2025
@dario-piotrowicz dario-piotrowicz force-pushed the dario/114/defineConfig branch 4 times, most recently from b52ba04 to 70735e6 Compare February 26, 2025 10:13
Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

this change adds a new `defineConfig` utility that developers can use in their `open-next.config.ts`
file to easily generate a configuration compatible with the adapter
@vicb vicb merged commit 58b200f into main Feb 27, 2025
7 checks passed
@vicb vicb deleted the dario/114/defineConfig branch February 27, 2025 19:21
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.

feat: Easier way to create an OpenNext config for cloudflare
4 participants