[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.

  • #477 by @wood1986 — closed without merging

Assessment

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

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.

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
Dominant language
JavaScript
Stars
12.7k
Forks
521
Avg merge
2d 9h
Merged PRs (30d)
7

Getting set up

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.

More from webpack/webpack-bundle-analyzer

All issues in webpack/webpack-bundle-analyzer

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.