-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
"Cookies" library causes a significant increase of vendors bundle size #330
Comments
@rclement WDYT? I knew that new library was be a bit bigger than the previous one but I wouldn't expect a big difference in bundle size. Would it be worth it keeping the old library and refactoring the code to still address the issue while keeping the bundle size as light as possible? |
@paulgv Indeed that’s a bit crazy just for handling cookies properly, I admit I was in a hurry and only checked my project bundle where Cookies may have already been included by another dependency... Of course, I’m all for a rewrite, as long as the previous bug is not reintroduced. Maybe reusing the ˋcookieˋ package and manually handling the ˋSet-Cookieˋ header properly is the way to go? We can be inspired by the startup of the ˋcookies` package which does just that (handling whethet this is undefined, a string or already a list). I won’t have time for it this week-end but I can do it next week if needed. |
The answer to question in #329 also applies here. |
@paulgv @remychvn I under-estimated my available time for this week-end, so I manage to send a new PR (#332) hopefully making the best of both worlds:
Let me know if missed something, again. |
What problem does this feature solve?
Reducing client bundle size to improve website load time
Hi,
I noticed that the addition of nuxt-i18n increased a lot my vendor.app.js bundle size
I looked for the source of this significant increase.
It seems that it's caused by the import of https://github.com/pillarjs/cookies that calls nodejs functions. (http and crypto)
Due to this, webpack adds many libraries to vendor bundle. Is this really necessary on the client side, just for a cookie library? I didn't dig deeper into the codebase to affirm that.
I dont know if you can do something to prevent this or if we must extend the nuxtjs webpack configuration ? How ?
The text was updated successfully, but these errors were encountered: