webpack / webpack/webpack-bundle-analyzer

[Nice to Have] plugin should use webpack InfrastructureLogger and output report to compiler.outputFileSystem

Open
#476 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
12.7k
Forks
514
Avg merge
6d 2h
Merged PRs (30d)
4

Description

Issue description

There are 2 issues for the plugin code(not bin/analyzer). Currently, it is not a bug but nice to have

  1. BundleAnalyzerPlugin.js should use InfrastructureLogger from webpack compiler. When I run my jest test, there are some noise message from the plugin. See the following screenshot.
    image
    I can silent the console.log for my jest test. But I have to write some to find the plugin in my shared webpack.config.js and then replace the existing plugin with another one to silent log messages.
  2. When I launch the webpack-dev-server, I expect my dist should be empty. Currently it always has report.html. Other assets are in memfs. I have a jest test to check the folder is empty. Now I have to write more code to handle it differently
    image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in BundleAnalyzerPlugin.js by tracing how plugin messages are emitted and how report.html is written during webpack-dev-server runs. Review the existing Jest test and webpack compiler APIs, then verify that logging uses InfrastructureLogger and that the report is written through compiler.outputFileSystem without appearing in dist.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.