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

upgrade to next15 #860

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

upgrade to next15 #860

wants to merge 4 commits into from

Conversation

adriangohjw
Copy link
Contributor

@adriangohjw adriangohjw commented Nov 6, 2024

Problem

Hoping to leverage the performance improvement stated in https://nextjs.org/blog/next-15#faster-static-generation-for-the-app-router to speed up SSG which is the remaining main bottleneck of slow build

partially closes https://linear.app/ogp/issue/ISOM-1661/optimise-site-build-times

Solution

Breaking Changes

  • Yes - this PR contains breaking changes
    • Details ...
  • No - this PR is backwards compatible

Improvements:

  • improved codebuild next build by 3 minutes (540s -> 360s) when tested on moh-corp PROD

note:

  • only upgrading for tooling/template because next 15 is not supported by storybook used in studio at the moment. Thus we have to tell the lint to exclude it

Tests

New dependencies:

  • dependency : next to v15

@adriangohjw adriangohjw added enhancement New feature or request dependencies Pull requests that update a dependency file labels Nov 6, 2024
@adriangohjw adriangohjw self-assigned this Nov 6, 2024
Copy link

vercel bot commented Nov 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
isomer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 6, 2024 3:29pm

@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Nov 6, 2024

Datadog Report

Branch report: dependencies-next15
Commit report: b20b6f9
Test service: isomer-studio

✅ 0 Failed, 167 Passed, 34 Skipped, 34.92s Total Time
➡️ Test Sessions change in coverage: 1 no change

@adriangohjw
Copy link
Contributor Author

need to put on HOLD because storybook is not compatible with next15 yet storybookjs/storybook#29421

Copy link

linear bot commented Nov 7, 2024

@@ -18,7 +18,7 @@
"format:fix": "turbo format --continue -- --write --cache --cache-location node_modules/.cache/.prettiercache --ignore-path ./.prettierignore",
"lint": "turbo lint --continue -- --cache --cache-location node_modules/.cache/.eslintcache",
"lint:fix": "turbo lint --continue -- --fix --cache --cache-location node_modules/.cache/.eslintcache",
"lint:ws": "npx [email protected]",
"lint:ws": "npx [email protected] -i next",
Copy link
Contributor

Choose a reason for hiding this comment

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

can i clarify what -i next does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it tells sherif to ignore the different next versions and not raise it as error

this is needed because postinstall runs lint:ws and block npm i from proceeding

@@ -12,11 +12,13 @@ import {
RenderEngine,
} from "@opengovsg/isomer-components"

export const dynamic = "force-static"
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this statement across the files? could you summarise what this implies?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would think that having the following in the next.config will auto-force all to be static

const nextConfig = {
  output: "export",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@harishv7 yeah i would think so too but somehow not including this will cause an issue during next build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants