webpack / webpack/webpack-bundle-analyzer

Setting output.globalObject breaks parsed + gzip

Open
#288 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs details / reproduction status: Needs triage
Dominant language
JavaScript
Stars
12.7k
Forks
514
Avg merge
6d 2h
Merged PRs (30d)
4

Description

Issue description
config.output.globalObject = "(typeof self !== 'undefined' ? self : this)"

Breaks parsed + gzip sizes. Removing it fixed them.

Technical info
  • Webpack Bundle Analyzer version: 3.3.2
  • Webpack version: 4.35.0
  • Node.js version: 11.10.0
  • npm/yarn version: 6.7.0
  • OS: mac os x; windows
Expected Behavior

Gzip and parsed should contain data bout more than just the output files - the modules inside them as well.

Actual Behavior

Only stats includes all modules. Gzip and parsed just show large blocks for each bundle piece (output file)

Code

My default:

config.output.globalObject = "(typeof self !== 'undefined' ? self : this)"

When I analyze:

delete config.output.globalObject;

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

No files, tests, or entry points are named. Reproduce the report with output.globalObject set, then compare stats, parsed, and gzip analysis results; done when parsed and gzip views include the modules inside each output file rather than only bundle-level blocks.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
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.