Next.js Discord

Discord Forum

Bundle size for firebase increases when adopting Next 15.2.0

Unanswered
Alligator mississippiensis posted this in #help-forum
Open in Discord
Alligator mississippiensisOP
Hi, We'd like to adopt the latest nextjs major, but one thing stoping us is the bundle size using bundle analyzer showed our node_modules went up 40kb. And 20kb of this is from firebase despite not touching its version in the update. it looks as though the gzipped version of it has gone up.

Any ideas whats going on, and how we can stop this?

18 Replies

Alligator mississippiensisOP
Alligator mississippiensisOP
Hey @Mugger Crocodile 👋 We used to work at Atlassian together in AFP (I'm Max Puckeridge).
I was hoping to get some help to do with bundling. There is this issue above to do with webpack i think.
I've also tried playing with your rspack example on canary but ran into errors. Anything you can do to help us get to 15 and not have a bundle size hit would be appreciated 🙏
Alligator mississippiensisOP
actually, i tried rspack in the issue repo, and it does work, and gets firebase to 59kb
Alligator mississippiensisOP
i'm not entirely sure we can use rspack anyway, as we use sentry webpack plugin and withPWA in our next config
Mugger Crocodile
Oh hey Max! I’m not super familiar with the webpack change that led to this but I’ll see if I can get you in touch with someone who is
Have you tried Rspack and it didn’t work? They’re api compatible for the most part but there are a few gaps
Alligator mississippiensisOP
yeah, i just tried rspack again today and seems to be better after the rename
i just got a succesful build in our actual app, and the bundle diff is smaller
but i definitely did see some build errors when using the sentry webpack plugin that uploads sourcemaps for example
Mugger Crocodile
Unfortunately not, we bundle a compiled version of webpack
With your reproduction and a Next checkout from source someone could bisect the version of webpack that introduced it
Alligator mississippiensisOP
ah ok, ill definitely check out our withPWA and withSentryWebpackPlugin a bit more
see if either can work with rspack in some way
@Mugger Crocodile Mind posting this to https://github.com/vercel/next.js/discussions/77800? Probably a significant issue for folks
Alligator mississippiensisOP
or do you mean about the webpack issue?
Mugger Crocodile
sorry, the issue using the sentry plugin if it shows up when you start using Rspack
Alligator mississippiensisOP
ah yeah. ok. i can share that for sure