add command to build and run OpenNext locally with dev overrides
For #541
I'll open this in draft mode for now. It wont work in a monorepo as of now. Im open for suggestions.
🦋 Changeset detected
Latest commit: 3ac2fbac7d10bc57519a9f938d547879e1e14a52
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
@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
devis 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
devcommand (with a different name) it should just call build with another config path (i.e.open-next.config.dev.tsfor 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.
Why not just a command to generate the base "dev" config instead. I feel like this will give us enough