Opened 22 months ago

Closed 19 months ago

Last modified 16 months 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):

https://codereview.adblockplus.org/29556638

Description

Background

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 22 months ago by trev

  • Priority changed from Unknown to P3
  • Ready set

comment:2 Changed 22 months ago by hfiguiere

  • Owner set to hfiguiere

comment:3 Changed 22 months ago by hfiguiere

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

comment:4 Changed 19 months ago by fhd

  • Cc trev removed

comment:5 Changed 19 months ago by kzar

  • Blocked By 6230 added

comment:6 Changed 19 months ago by abpbot

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

comment:7 Changed 19 months ago by kzar

  • Blocked By 6230 removed

comment:8 Changed 19 months ago by kzar

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

comment:9 Changed 16 months ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

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

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

Note: See TracTickets for help on using tickets.