Skip to content

add command to build and run OpenNext locally with dev overrides #853

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sommeeeer
Copy link
Contributor

For #541

I'll open this in draft mode for now. It wont work in a monorepo as of now. Im open for suggestions.

Copy link

changeset-bot bot commented May 4, 2025

⚠️ No Changeset found

Latest commit: 1b5ffc9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

pkg-pr-new bot commented May 4, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/@opennextjs/aws@853

commit: 1b5ffc9

@conico974
Copy link
Contributor

@sommeeeer Honestly i'm not sure what to do with this. The only point right now of such a command is for people contributing to OpenNext, and you'll likely end up with your own config (at least to test things out).
dev is not a good name either, it will be misleading.
It's also not like preview in cloudflare (which use the exact same things as deployed), here every overrides are dev ones.

Best things to do would probably just be to make it work for monorepo, and if we really want to have a dev command (with a different name) it should just call build with another config path (i.e. open-next.config.dev.ts for example) and run the server right away

@sommeeeer
Copy link
Contributor Author

sommeeeer commented May 5, 2025

dev is not a good name either, it will be misleading.

Yeah the name should not be dev. local could perhaps be a better fit?

Best things to do would probably just be to make it work for monorepo, and if we really want to have a dev command (with a different name) it should just call build with another config path (i.e. open-next.config.dev.ts for example) and run the server right away

Should I continue on this one (im trying to make it work in monorepos) or perhaps close it? This was mainly for people working on OpenNext as it can be a bit cumbersone to copy and make config files each time you need to test something quick locally. Like features in the routingHandler or similar.

@sommeeeer sommeeeer changed the title add dev command add command to run build and run OpenNext locally with dev overrides May 5, 2025
@sommeeeer sommeeeer changed the title add command to run build and run OpenNext locally with dev overrides add command to build and run OpenNext locally with dev overrides May 5, 2025
@conico974
Copy link
Contributor

Why not just a command to generate the base "dev" config instead. I feel like this will give us enough

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.

2 participants