Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

413 on initial assets upload #9

Open
tstirrat15 opened this issue May 26, 2020 · 1 comment
Open

413 on initial assets upload #9

tstirrat15 opened this issue May 26, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@tstirrat15
Copy link

I'm trying to get bundle-analyzer working on our app. We've got a bundle that includes some ~600 image assets (300 svgs + their gzipped counterparts). When it goes to do the initial asset array upload, that endpoint 413s because the assets object is larger than the 100kb limit that's defaulted to in the middleware for that endpoint. I was able to hack around it by adding an excludeAssets filter to the webpack plugin code:

      const stats = hookCompiler.getStats().toJson({
        maxModules: Infinity,
        source: false,
        excludeAssets: [/.svg/, /.jpg/],
      });

So it seems there would be two ways to go about fixing this:

  • Bump the body size limit (would prevent this error from happening by default)
  • Add logic to the webpack plugin to allow the user to exclude assets (perhaps could go into the configuration?)

I noted that while there did seem to be filter logic in the configuration file, that filter logic wasn't used in the webpack plugin. Would that be a way to approach it?

@gregberge
Copy link
Member

Hello, I don't have time to maintain the project. Looking for a maintainer.

@gregberge gregberge added the bug Something isn't working label Jul 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants