Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#6310 closed change (fixed)

Start using JavaScript modularization tool in adblockplusui — at Version 6

Reported by: saroyanm Assignee:
Priority: P3 Milestone:
Module: User-Interface Keywords:
Cc: greiner, kzar, sebastian, wspee, agiammarchi Blocked By:
Blocking: #6117 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



In order to organize JavaScript files better and make code modularized we need to agree on a tool and start making use of it.

What to change

Add JavaScript modularization tool to adblockplusui

Change History (6)

comment:1 Changed 2 years ago by saroyanm

Flattr uses Browserify, Platform is using WebPack

We want to consider ESM loader and/or Rollup as well.

Last edited 2 years ago by saroyanm (previous) (diff)

comment:2 Changed 2 years ago by saroyanm

  • Blocking 6117 added

comment:3 Changed 2 years ago by greiner

  • Cc greiner added

comment:4 Changed 2 years ago by agiammarchi

Thomas, Manvel, I know this is not ready yet but I really need this to be ready and resolved ASAP.

I have uploaded a proof of concept that is not fancy at all but already works.

Major points there:

  • zero config, we gradually enrich package.json scripts as we go
  • graceful migration, it allows us to keep everything we have already exactly where it is. No third parts changes. No cross-team effort. We just create and ship bundles per each page/section, instead of monoliths
  • no global scope pollution, and no runtime evaluation. Everything is bundled as IIFE [1] and with use strict directive preserved.

If you are happy with that code review diff please mark this as ready and/or eventually discuss what we could do better (a lot, I know, but I also think we should incrementally find the best solution).

Thanks for considerations.


comment:5 Changed 2 years ago by abpbot

A commit referencing this issue has landed:
Issue 6310 - Start using JavaScript modularization tool

comment:6 Changed 2 years ago by agiammarchi

  • Resolution set to fixed
  • Review URL(s) modified (diff)
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.