Skip to content

Conversation

@ovflowd
Copy link
Member

@ovflowd ovflowd commented Jul 2, 2023

Description

This PR does some minimal changes meant to improve the build experience and reduce the performance costs.

  • This PR moves the shared helpers.mjs into next.helpers.mjs as they're not exclusive to next-data
  • This PR moves the next-data/index.mjs to just next.data.mjs
  • This PR enables exclusion of some hefty modules, such as swc from the output tracing
  • This PR removes isomorphic dompurify as to be honest, it is not needed as all Markdown Pre/HTML code comes from our Markdown Pages (DOMPurify also had a significant impact on the final bundle)
  • This PR removes all languages besides JavaScript from the Highlight.js bundle as it was gigantic (the "common" language set was extensive and unnecessary)
    • highlight.js is going to be removed once we get rid of the legacy pages
  • This PR does some minor optimisations with the Next.js configuration and the Theme Component by disabling unnecessary re-renders
  • This PR updates some packages
  • This PR adopts ESM for the Storybook Test Runner
  • This PR simplifies the precommit hook by simply using git checkout
  • This PR updates the build scripts removing the repeated prebuild

@ovflowd ovflowd requested a review from a team as a code owner July 2, 2023 15:06
@vercel
Copy link

vercel bot commented Jul 2, 2023

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

Name Status Preview Comments Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2023 6:53pm
nodejs-org-stories ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2023 6:53pm

@vercel vercel bot temporarily deployed to Preview – nodejs-org July 2, 2023 15:07 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories July 2, 2023 15:08 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories July 2, 2023 15:14 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org July 2, 2023 15:15 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org July 2, 2023 15:19 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories July 2, 2023 15:19 Inactive
Copy link
Contributor

@Harkunwar Harkunwar left a comment

Choose a reason for hiding this comment

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

LGTM!

@ovflowd ovflowd added the fast-track Fast Tracking PRs label Jul 2, 2023
@ovflowd
Copy link
Member Author

ovflowd commented Jul 2, 2023

cc @nodejs/website requesting fast-tracking here as some of these changes would benefit from being deployed soonish.

@bmuenzenmeyer
Copy link
Contributor

bmuenzenmeyer commented Jul 2, 2023

Read through it too, look good.

The sanitization is a bit concerning for long term consideration, in case remote markdown is ever used.

@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories July 2, 2023 18:18 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org July 2, 2023 18:20 Inactive
@ovflowd
Copy link
Member Author

ovflowd commented Jul 2, 2023

The sanitization is a bit concerning for long term consideration, in case remote markdown is ever used.

@bmuenzenmeyer agreed. But to be fair, all the Components with manual unsafe injection of HTML will be removed once we migrate to the new Components.

But I would probably also avoid at all costs on actually using remote markdown, even tho we do use MDXRemote as a component.

@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories July 2, 2023 18:51 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org July 2, 2023 18:53 Inactive
@bmuenzenmeyer
Copy link
Contributor

But to be fair, all the Components with manual unsafe injection of HTML will be removed once we migrate to the new Components.

apologies, I feel as if I keep bringing up things the team has already thought through 😄

@ovflowd ovflowd merged commit d362b77 into nodejs:main Jul 2, 2023
@ovflowd ovflowd deleted the feat/some-config-changes branch July 2, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track Fast Tracking PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants