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: allow extra args to be passed to nextjs cli #4252

Closed

Conversation

julianklumpers
Copy link

@julianklumpers julianklumpers commented Nov 15, 2023

Closes: -

What are the changes and their implications?

Allow extra args to be passed to the nextjs CLI. For example in my case: blitz dev -p 3000 --experimental-https. The --experimental-https will be passed down to he nextjs cli.

Bug Checklist

  • Changeset added (run pnpm changeset in the root directory)
  • Integration test added (see test docs if needed)

Feature Checklist

Copy link

changeset-bot bot commented Nov 15, 2023

🦋 Changeset detected

Latest commit: 63dc838

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

This PR includes changesets to release 8 packages
Name Type
blitz Major
next-blitz-auth Patch
@blitzjs/auth Major
@blitzjs/next Major
@blitzjs/rpc Major
@blitzjs/codemod Major
@blitzjs/config Major
@blitzjs/generator Major

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

Comment on lines +20 to +28
const extraArgs = nextArgs["_"].filter((arg) => arg !== "start")

const config: ServerConfig = {
rootFolder: process.cwd(),
port: nextArgs["--port"],
hostname: nextArgs["--hostname"],
inspect: nextArgs["--inspect"],
env: process.env.NODE_ENV === "production" ? "prod" : "dev",
extraArgs,
Copy link
Member

Choose a reason for hiding this comment

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

hey thank you! Been wanting this for awhile.

Few things

  • we need to make sure extraArgs is not also including ones we explicitly use (like --inspect)
  • we should remove our use of --hostname and --port while we are here, they are legacy and no longer needed

Copy link
Member

Choose a reason for hiding this comment

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

hi @julianklumpers, are you able to make these changes?

Copy link
Author

Choose a reason for hiding this comment

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

yes, sorry for my late reply. Will try to implement this very soon.

@flybayer
Copy link
Member

flybayer commented Feb 6, 2024

Hey, I'm going to close this for now as it's gone cold. Feel free to fix and re-open :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants