cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

build: Use "standalone" output to build Next.js as a standalone app

Open jckw opened this issue 1 year ago • 4 comments

What does this PR do?

This PR changes the Next.js output type of the @calcom/web app to "standalone", which is needed if https://github.com/calcom/docker/pull/355 is to merge.

The "output" config property should not affect builds being run on Vercel, but will affect those built with Docker.

Please see the linked PR for a full explanation of why this is useful. The summary is:

  • "standalone" results in a 40% reduction in image size
  • "standalone" is the standard config property used in the Next.js example Dockerfile, so allows the calcom/docker repo to use a Dockerfile similar to that, thereby requiring less maintenance

Requirement/Documentation

  • Most of the details are here: https://github.com/calcom/docker/pull/355

Type of change

  • Chore (refactoring code, technical debt, workflow improvements)
  • This isn't really a breaking change unless someone is running "next build" outside of Vercel and their PaaS cannot handle "standalone" output or they are managing the build output themselves. This seems unlikely though.
    • The exception is Docker. This PR will break docker builds unless the linked PR is merged. But.. Docker builds have been broken for 2+ months anyway, so nbd.

How should this be tested?

  • Are there environment variables that should be set? No
  • What is expected (happy path) to have (input and output)? Everything works exactly as it does now
  • Any other important info that could help to test that PR

Test out this branch on whatever build process is used by Cal (presumably Vercel), and verify that it works and deploys. Unless there is any special config used by Cal, everything should work as normal on Vercel.

Mandatory Tasks

  • [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't checked if my PR needs changes to the documentation
  • I haven't added tests that prove my fix is effective or that my feature works

jckw avatar May 02 '24 08:05 jckw

@jckw is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar May 02 '24 08:05 vercel[bot]

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

github-actions[bot] avatar May 02 '24 08:05 github-actions[bot]

Graphite Automations

"Add community label" took an action on this PR • (05/02/24)

1 label was added to this PR based on Keith Williams's automation.

"Add consumer team as reviewer" took an action on this PR • (05/02/24)

1 reviewer was added to this PR based on Keith Williams's automation.

graphite-app[bot] avatar May 02 '24 08:05 graphite-app[bot]

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

github-actions[bot] avatar May 02 '24 08:05 github-actions[bot]

This PR is being marked as stale due to inactivity.

github-actions[bot] avatar May 30 '24 00:05 github-actions[bot]

Hi @jckw I'm unable to update this branch (critical to do so as the checks will not run properly otherwise) - will close and re-open a mirror.

emrysal avatar Jun 11 '24 17:06 emrysal