-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Next.js Bundle Analysis for @ifixit/commerce-frontendThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
353.98 KB (🟡 +2.36 KB) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
One Page Changed Size
The following page changed size from the code in this PR compared to its base branch:
Page | Size (compressed) | First Load |
---|---|---|
/products/[handle] |
58.75 KB (🟡 +541 B) |
412.73 KB |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link
is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.
Does this mean it will use whatever minifier it used to before using swc by default? The bundle size is only slightly bigger, so this seems fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR 👍
based on this it seems like it falls back to terser, which im assuming it was using before next 13 by default. |
Before merging this I think we should consider upgrading Next.js to the latest version. I'd just try to bump Next to the latest version before switching off the new default. |
deploy_block 🛑 on the previous comment. |
QA 🟢 The Vercel preview appears fine 👍 |
un_deploy_block ✌️ we tried the upgrade and the error didn't go away |
This small change took some digging. 1) We decided to try setting this to false in hopes of fixing two issues #1797 #1846 The first issue was fixed (1797) while the second issue was not (1846). 2) Next 14 fails to build with terser enabled. This is because terser doesn't support node some out the new tsx used by Next 14. The error is: ../pages/_document.js from Terser Unexpected token: punc ({) [../pages/_document.js:675,10] My best guess from some googling is this is due to the class static keyword: terser/terser#1160 However, this is fixed simply by using the SWC minifier (default) instead of terser. 3) Now with Next 14 the docs claim we shouldn't need terser anymore: https://nextjs.org/docs/architecture/nextjs-compiler In fact, Terser will not be supported in Next 15 slated for release next year.
Overview
We've had some errors show up on sentry like this since we updated
next.js
. Based on a github issue comment on the next js repo, turningswcMinify
tofalse
may stop these errors. You can read more aboutswc
here and here but basically next js started using it to compile and it could be causing this error. Becausenext.js
just changed the default fromfalse
totrue
and now this is changing it back, im not too worried about potential problems with this change, outside of slower build times and the like. Nevertheless, we should keep an eye on sentry when this deploys.QA
Make sure the vercel preview seems fine.
Connects: #1808