Opened 3 years ago

Last modified 3 years ago

#6020 closed defect

Unnecessary code being included in webpack bundles — at Version 7

Reported by: kzar Assignee: kzar
Priority: P2 Milestone:
Module: Automation Keywords:
Cc: trev, sebastian, tlucas, sylvaing@… Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29602573/

Description (last modified by trev)

Environment

adblockpluschrome ecdd8caaf81a

How to reproduce

  1. Open the Chrome developer tools for the background page
  2. Click the Sources pane and expand the webpack:// section

Observed behaviour

The unused (webpack)/buildin/global.js is listed.

Expected behaviour

That file should not be listed, since we don't use it!

Notes

The code in question uses eval which is flagged by Mozilla's add-on linter. It is never being used and wouldn't work anyway because of CSP.

Change History (7)

comment:1 Changed 3 years ago by kzar

  • Cc awagner@… kewisch@… removed
  • Summary changed from Unnesissary code being included in webpack bundles to Unnecessary code being included in webpack bundles

comment:2 Changed 3 years ago by tlucas

  • Ready set

comment:3 Changed 3 years ago by trev

  • Description modified (diff)

comment:4 Changed 3 years ago by kzar

According to https://webpack.github.io/analyse it's being included due to a "cjs require" in adblockpluscore/lib/rusha.js.

Last edited 3 years ago by kzar (previous) (diff)

comment:5 Changed 3 years ago by kzar

It's this check in adblockpluscore/lib/rusha.js which is causing it: typeof global !== 'undefined' && global.Buffer && global.Buffer.isBuffer(data)

comment:6 Changed 3 years ago by kzar

  • Component changed from Build-and-Release-Tools to Core

comment:7 Changed 3 years ago by kzar

  • Component changed from Core to Build-and-Release-Tools
  • Review URL(s) modified (diff)
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.