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

perf: Pre-compile dependencies to reduce install size/time #770

Merged
merged 1 commit into from Jan 14, 2022

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Jan 14, 2022

This moves all dependencies to devDependencies by pre-compiling with ncc to reduce the install size and time.

Before: 2.5M styled-jsx-pre-ncc/node_modules
After: 904K styled-jsx-post-ncc/node_modules

This removes 17 nested dependencies.

x-ref: vercel/next.js#32742

@ijjk ijjk changed the title Pre-compile dependencies to reduce install size/time perf: Pre-compile dependencies to reduce install size/time Jan 14, 2022
@ijjk ijjk marked this pull request as ready for review January 14, 2022 13:54
@ijjk ijjk requested a review from giuseppeg as a code owner January 14, 2022 13:54
@ijjk ijjk requested review from huozhi, styfle and timneutkens and removed request for giuseppeg January 14, 2022 13:54
Copy link
Member

@huozhi huozhi left a comment

Choose a reason for hiding this comment

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

🚀

@huozhi
Copy link
Member

huozhi commented Jan 14, 2022

We might can also get rid of the warning of styled-jsx when install next.js, since babel plugin is not a dep anymore

@huozhi huozhi merged commit b214c51 into beta Jan 14, 2022
@huozhi huozhi deleted the pre-compile-deps branch January 14, 2022 14:12
@github-actions
Copy link

🎉 This PR is included in version 5.0.0-beta.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

kodiakhq bot pushed a commit to vercel/next.js that referenced this pull request Jan 17, 2022
This ncc's some remaining dependencies bringing us under 20 install time dependencies (including nested dependencies), this also reduces install size by another `2.75 MB`. A follow-up PR will investigate a custom install script for our swc packages to allow us to remove the `optionalDependencies` which is slowing down install time as well. 

x-ref: #32679
x-ref: #32627
x-ref: #31887
x-ref: vercel/styled-jsx#770
natew pushed a commit to natew/next.js that referenced this pull request Feb 16, 2022
This ncc's some remaining dependencies bringing us under 20 install time dependencies (including nested dependencies), this also reduces install size by another `2.75 MB`. A follow-up PR will investigate a custom install script for our swc packages to allow us to remove the `optionalDependencies` which is slowing down install time as well. 

x-ref: vercel#32679
x-ref: vercel#32627
x-ref: vercel#31887
x-ref: vercel/styled-jsx#770
nevilm-lt pushed a commit to nevilm-lt/next.js that referenced this pull request Apr 22, 2022
This ncc's some remaining dependencies bringing us under 20 install time dependencies (including nested dependencies), this also reduces install size by another `2.75 MB`. A follow-up PR will investigate a custom install script for our swc packages to allow us to remove the `optionalDependencies` which is slowing down install time as well. 

x-ref: vercel#32679
x-ref: vercel#32627
x-ref: vercel#31887
x-ref: vercel/styled-jsx#770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants