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

Feat: Add dev overrides #689

Merged
merged 6 commits into from
Jan 6, 2025
Merged

Conversation

conico974
Copy link
Contributor

This PR adds a bunch of overrides that is useful to run OpenNext locally.
They can be used in the config file:

import type {OpenNextConfig} from "@opennextjs/aws/types/open-next.js"

export default {
  default: {
    override: {
      wrapper: "express-dev",
      converter: "node",
      incrementalCache: "fs-dev",
      queue: "direct",
      tagCache: "fs-dev"
    }
  },

  imageOptimization: {
    override: {
      wrapper: "dummy",
      converter: "dummy"
    },
    loader: "fs-dev",
    // This part is not needed on arm linux, and image optimization will only work in linux
    install: {
      arch: "x64",
      packages: ["sharp"]
    }
  },
} satisfies OpenNextConfig

"direct" queue could also be used to remove the need to have a queue. It should not be used where waitUntil is not properly supported as it means that ISR will wait for the revalidation to be done before returning the response. Revalidation request will also not be deduped

Copy link

changeset-bot bot commented Jan 4, 2025

🦋 Changeset detected

Latest commit: e8e1d60

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 Minor
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 Jan 4, 2025

Open in Stackblitz

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

commit: e8e1d60

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.

NIce!

A few nits

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.

The Set thing was only a suggestion, up to you to apply or not (I agree it's not a big deal)

@conico974 conico974 merged commit e8f6dc8 into opennextjs:main Jan 6, 2025
3 checks passed
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