Because Razzle uses Node.js API directly, there's no way of passing --json argument to generate JSON file that can be used with analyse tool.
It would be nice if Razzle had a CLI command that'd allow dumping this JSON separately for client and server, so it's possible to analyze and debug bundle size.
I also started looking into this and didn't come up with a solution easily
I use StatsWriterPlugin to write stats to a file. Make sure you set fields: null option to get the full bundle.
Just add BundleAnalyzerPlugin to webpack config in razzle.config.js if you want a report about production build
@Metnew good idea, thanks! I'll add it to README and send a PR once I have free time to do so
Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal.
ProBot automatically closed this due to inactivity. Holler if this is a mistake, and we'll re-open it.
Most helpful comment
Just add
BundleAnalyzerPluginto webpack config inrazzle.config.jsif you want a report about production build