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

Remove extra variable from useAmp #8329

Merged
merged 1 commit into from
Aug 12, 2019

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Aug 11, 2019

Just a very small size win.

Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

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

LGTM assuming tests pass.

@Timer Timer added this to the 9.0.4 milestone Aug 11, 2019
@ijjk
Copy link
Member

ijjk commented Aug 11, 2019

Stats from current PR

Click to expand stats
zeit/next.js canary timneutkens/next.js fix/small-useamp-fix Change
Build Duration 20s 19.7s -260ms
node_modules Size 41.6 MB 41.6 MB -71 B
Total Bundle (main, webpack, commons) Size 214 kB 214 kB
Total Bundle (main, webpack, commons) gzip Size 70.6 kB 70.6 kB
Total Bundle (main, webpack, commons) Modern Size 189 kB 189 kB
Total Bundle (main, webpack, commons) Modern gzip Size 62.4 kB 62.4 kB
Client _app Size 2.35 kB 2.35 kB
Client _app gzip Size 1.07 kB 1.07 kB
Client _app Modern Size 1.79 kB 1.79 kB
Client _app gzip Modern Size 880 B 880 B
Client _error Size 8.22 kB 8.22 kB
Client _error gzip Size 3.16 kB 3.16 kB
Client _error Modern Size 5.85 kB 5.85 kB
Client _error gzip Modern Size 2.33 kB 2.33 kB
Client pages/index Size 343 B 343 B
Client pages/index gzip Size 246 B 246 B
Client pages/index Modern Size 319 B 319 B
Client pages/index gzip Modern Size 254 B 254 B
Client pages/link Size 4.18 kB 4.18 kB
Client pages/link gzip Size 1.82 kB 1.82 kB
Client pages/link Modern Size 3.81 kB 3.81 kB
Client pages/link gzip Modern Size 1.72 kB 1.72 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/routerDirect Modern Size 411 B 411 B
Client pages/routerDirect gzip Modern Size 314 B 314 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 301 B 301 B
Client pages/withRouter Modern Size 423 B 423 B
Client pages/withRouter gzip Modern Size 309 B 309 B
Client main Size 16.3 kB 16.3 kB
Client main gzip Size 5.73 kB 5.73 kB
Client main Modern Size 13.1 kB 13.1 kB
Client main Modern gzip Size 4.99 kB 4.99 kB
Client commons Size 195 kB 195 kB
Client commons gzip Size 63.6 kB 63.6 kB
Client commons Modern Size 176 kB 176 kB
Client commons Modern gzip Size 57.4 kB 57.4 kB
Client webpack Size 1.53 kB 1.53 kB
Client webpack gzip Size 778 B 778 B
Client webpack Modern Size 1.53 kB 1.53 kB
Client webpack Modern gzip Size 785 B 785 B
Base Rendered Size 2.76 kB 2.76 kB
Build Dir Size 1.44 MB 1.44 MB -96 B
Click to expand serverless stats
zeit/next.js canary timneutkens/next.js fix/small-useamp-fix Change
Build Duration 21.6s 21.5s -42ms
node_modules Size 41.6 MB 41.6 MB -71 B
Total Bundle (main, webpack, commons) Size 214 kB 214 kB
Total Bundle (main, webpack, commons) gzip Size 70.6 kB 70.6 kB
Total Bundle (main, webpack, commons) Modern Size 189 kB 189 kB
Total Bundle (main, webpack, commons) Modern gzip Size 62.4 kB 62.4 kB
Client _app Size 2.35 kB 2.35 kB
Client _app gzip Size 1.07 kB 1.07 kB
Client _app Modern Size 1.79 kB 1.79 kB
Client _app gzip Modern Size 880 B 880 B
Client _error Size 8.22 kB 8.22 kB
Client _error gzip Size 3.16 kB 3.16 kB
Client _error Modern Size 5.85 kB 5.85 kB
Client _error gzip Modern Size 2.33 kB 2.33 kB
Client pages/index Size 343 B 343 B
Client pages/index gzip Size 246 B 246 B
Client pages/index Modern Size 319 B 319 B
Client pages/index gzip Modern Size 254 B 254 B
Client pages/link Size 4.18 kB 4.18 kB
Client pages/link gzip Size 1.82 kB 1.82 kB
Client pages/link Modern Size 3.81 kB 3.81 kB
Client pages/link gzip Modern Size 1.72 kB 1.72 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/routerDirect Modern Size 411 B 411 B
Client pages/routerDirect gzip Modern Size 314 B 314 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 301 B 301 B
Client pages/withRouter Modern Size 423 B 423 B
Client pages/withRouter gzip Modern Size 309 B 309 B
Client main Size 16.3 kB 16.3 kB
Client main gzip Size 5.73 kB 5.73 kB
Client main Modern Size 13.1 kB 13.1 kB
Client main Modern gzip Size 4.99 kB 4.99 kB
Client commons Size 195 kB 195 kB
Client commons gzip Size 63.6 kB 63.6 kB
Client commons Modern Size 176 kB 176 kB
Client commons Modern gzip Size 57.4 kB 57.4 kB
Client webpack Size 1.53 kB 1.53 kB
Client webpack gzip Size 778 B 778 B
Client webpack Modern Size 1.53 kB 1.53 kB
Client webpack Modern gzip Size 785 B 785 B
Serverless pages/link Size 256 kB 256 kB -48 B
Serverless pages/link gzip Size 68.8 kB 68.8 kB -23 B
Serverless pages/index Size 249 kB 248 kB -48 B
Serverless pages/index gzip Size 66.6 kB 66.5 kB -25 B
Serverless pages/_error Size 248 kB 248 kB -48 B
Serverless pages/_error gzip Size 66.3 kB 66.3 kB -24 B
Serverless pages/routerDirect Size 249 kB 249 kB -48 B
Serverless pages/routerDirect gzip Size 66.5 kB 66.5 kB -26 B
Serverless pages/withRouter Size 249 kB 249 kB -48 B
Serverless pages/withRouter gzip Size 66.6 kB 66.6 kB -25 B
Build Dir Size 2.64 MB 2.64 MB -385 B

Copy link
Member

@ijjk ijjk left a comment

Choose a reason for hiding this comment

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

Looks like a good tweak to save some bytes off the serverless bundles 👍

@Timer Timer merged commit 35e7b21 into vercel:canary Aug 12, 2019
@timneutkens timneutkens deleted the fix/small-useamp-fix branch August 12, 2019 09:01
@vercel vercel locked as resolved and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants