webpack-bundle-analyzer icon indicating copy to clipboard operation
webpack-bundle-analyzer copied to clipboard

Fix .cjs files not showing up in bundle analyzer

Open Rush opened this issue 3 years ago • 5 comments

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?

Rush avatar Jul 17 '22 03:07 Rush

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: Rush / name: Damian Kaczmarek (da87ff0ce7998be401802cee18aa9046b586de43, e14a6764939b95d232d26350c5d261eb15c9fadf, dcb5adea2e19e27e464b2eee86ea4a7e21ea6898)
  • :white_check_mark: login: valscion / name: Vesa Laakso (710fa677f691eec6a4cd6227dc8c1ce491d191b2)
  • :white_check_mark: login: alexander-akait / name: Alexander Akait (667bd168798edb682029526148232af3e778c6ee)

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

Rush avatar Jul 17 '22 04:07 Rush

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

Rush avatar Jul 17 '22 05:07 Rush

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 avatar Jul 21 '22 07:07 valscion

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.

valscion avatar Oct 17 '23 06:10 valscion

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

alexander-akait avatar Apr 08 '24 17:04 alexander-akait

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.

valscion avatar Apr 09 '24 10:04 valscion

Okey, I will resend it :+1:

alexander-akait avatar Apr 09 '24 13:04 alexander-akait

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 :-)

Rush avatar Apr 09 '24 14:04 Rush

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?

valscion avatar Apr 10 '24 08:04 valscion

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

Rush avatar Apr 10 '24 14:04 Rush

@valscion Added a test case

alexander-akait avatar Apr 10 '24 15:04 alexander-akait

This has now been released as part of v4.10.2

valscion avatar Apr 11 '24 11:04 valscion