Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#5762 closed change (fixed)

Use relative require paths in adblockpluscore

Reported by: kzar Assignee: hfiguiere
Priority: P3 Milestone:
Module: Core Keywords:
Cc: sebastian, fhd, sergz Blocked By: #5535
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):



Previously we've used our own system for managing modules, the files bundled were specified manually in the metadata and then modules were required with no path part.

With the switch to using webpack for bundling, bundled files are resolved at build time automatically. When modules are required with no path part webpack will check the hard-coded resolve paths for suitable files, but that has several limitations / problems.

What to change

Change all require calls in adblockpluscore to use relative paths. E.g.

In adblockpluscore/lib/elemHide.js this require:

const {ElemHideException} = require("filterClasses");

should become:

const {ElemHideException} = require("./filterClasses");

Change History (9)

comment:1 Changed 3 years ago by trev

  • Priority changed from Unknown to P3
  • Ready set

comment:2 Changed 3 years ago by hfiguiere

  • Owner set to hfiguiere

comment:3 Changed 3 years ago by hfiguiere

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed 2 years ago by fhd

  • Cc trev removed

comment:5 Changed 2 years ago by kzar

  • Blocked By 6230 added

comment:6 Changed 2 years ago by abpbot

A commit referencing this issue has landed:
Issue 5762 - Use relative require paths

comment:7 Changed 2 years ago by kzar

  • Blocked By 6230 removed

comment:8 Changed 2 years ago by kzar

  • Cc sergz added
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:9 Changed 2 years ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Done. Doesn't seem to have caused any major breakages.

Firefox 51 / 58 / Windows 10
Chrome 49 / 65 / Windows 7
Opera 36 / 51 / Windows 7

Note: See TracTickets for help on using tickets.