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 2 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

🦋 Changeset detected

Latest commit: 3ac2fba

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

This PR includes changesets to release 3 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch
app-router 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 May 4, 2025

Open in StackBlitz

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

commit: 3ac2fba

@sommeeeer sommeeeer force-pushed the dev-command branch 2 times, most recently from e16641a to a28f8ce Compare May 5, 2025 06:40
@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

@sommeeeer sommeeeer marked this pull request as ready for review May 9, 2025 19:51
@sommeeeer sommeeeer marked this pull request as draft May 10, 2025 06:39
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