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/size: smaller nuxt-start size #4377
Comments
That shouldnt happen. It work without nuxt and im using it for aws lambda serverless. |
@aldarund I was able to get |
@rlindskog its not 26mb even with core-js. Its 15,7 MB (16 561 152 bytes) Other is your deps. |
If you calculate it with Anyway, I found that That's 26mb for Nuxt (19mb without |
@rlindskog core-js shouldnt be needed. its a bug in babel that should be fixed in next release of preset-env babel/babel#9048 and it should appear only in node 10+. You use node 10 or 11 right? |
@aldarund Good work! I think After
It looks like |
@rlindskog Good catch! |
It is now after #4439. More optimizations on the way. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What problem does this feature solve?
Cold starts on serverless platforms like Now 2.0 would be more efficient.
What does the proposed changes look like?
When I have a
package.json
file that looks like this (working example)Run with
nuxt-start
npm ci —production
nu -sch ./node_modules
: > 100mbWhen I have a
package.json
file that looks like this (working example)and programatically run with
nuxt.render
npm ci
npm run build
npm ci —production
nu -sch ./node_modules
is 26mbWhich is still pretty big.
(this installation pattern was taken from @now/next)
I noticed the
nuxt-start
package, but it doesn’t work unlessnuxt
is installed as well, which brings us back to where we started at > 100mb.In comparison
react
,react-dom
,next-server@canary
has a2.8mb12mb node_modules footprintnext-server is used in the @next/builder.
Conclusion
There should be an npm module similar to next-server, but for nuxt. This would make it easier to make a nuxt-builder for Now 2.0
The text was updated successfully, but these errors were encountered: