webpack-contrib / webpack-bundle-analyzer

Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap
MIT License
12.56k stars 483 forks source link

Fix .cjs files not showing up in bundle analyzer #512

Closed Rush closed 4 months ago

Rush commented 2 years ago

I compile my server-side code to .cjs files. I was surprised to find the bundle analyzer view to be completely empty.

After debugging it turned out that .cjs filename was not being handled.

I think in general all assets should be included in the analysis but .cjs is good for now!

Could you release this patch on npm as well?

linux-foundation-easycla[bot] commented 2 years ago

CLA Signed

The committers listed above are authorized under a signed CLA.

Rush commented 2 years ago

Btw. I signed CLA. You can re-run your CI.

Rush commented 2 years ago

Thanks! :) I would appreciate if it could be released in the nearby future.

valscion commented 2 years ago

Looks good, thanks! Are you able to create a small test to verify this won't regress in the future? Also a mention of this change in changelog would be nice 😊

valscion commented 10 months ago

Hi @Rush are you still interested in getting this PR done? We'd need this PR to be rebased on top of latest master and a small test added to verify it won't regress in the future. A changelog entry would also be nice.

alexander-akait commented 5 months ago

@valscion Hello, can we resolve this PR? Because a got a lot of questions why .cjs doesn't work

valscion commented 4 months ago

Yeah a PR which adds a minimal test case showing that .cjs files work, adds a changelog entry and does this same change will be accepted.

alexander-akait commented 4 months ago

Okey, I will resend it :+1:

Rush commented 4 months ago

Sorry I don't have any bandwidth to work on it. One solution to consider would be to merge this and create a follow up issue with a test case. I've been using my .cjs branch for almost two years now :-)

valscion commented 4 months ago

Yeah now that this PR is up-to-date then adding some test coverage should hopefully be quite simple.

Would you @Rush have bandwidth to create a changelog entry for this change still?

Rush commented 4 months ago

@valscion let me know if this is what you had in mind

alexander-akait commented 4 months ago

@valscion Added a test case

valscion commented 4 months ago

This has now been released as part of v4.10.2