#5760 closed change (fixed)
Use relative require paths in adblockpluschrome
Reported by: | kzar | Assignee: | jsonesen |
---|---|---|---|
Priority: | P3 | Milestone: | Adblock-Plus-3.1-for-Chrome-Opera-Firefox |
Module: | Platform | Keywords: | |
Cc: | sebastian | Blocked By: | #5535 |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | yes | Confidential: | no |
Tester: | Ross | Verified working: | yes |
Review URL(s): |
Description (last modified by kzar)
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 adblockpluschrome to use relative paths. E.g.
In adblockpluschrome/lib/whitelisting.js this require:
const {RegExpFilter} = require("filterClasses");
should become:
const {RegExpFilter} = require("../adblockpluscore/lib/filterClasses");
The legacy prefix syntax should be replaced too. E.g.
In adblockpluschrome/include.preload.js this require:
let {ElemHideEmulation} = require("content_elemHideEmulation");
should become:
let {ElemHideEmulation} = require("./adblockpluscore/lib/content/elemHideEmulation");
Change History (7)
comment:1 Changed 2 years ago by kzar
- Description modified (diff)
comment:2 Changed 2 years ago by sebastian
- Priority changed from Unknown to P3
- Ready set
comment:3 Changed 22 months ago by jsonesen
- Owner set to jsonesen
comment:4 Changed 22 months ago by jsonesen
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:5 Changed 20 months ago by abpbot
comment:6 Changed 20 months ago by kzar
- Milestone set to Adblock-Plus-for-Chrome-Opera-Firefox-next
- Resolution set to fixed
- Status changed from reviewing to closed
comment:7 Changed 19 months ago by Ross
- Tester changed from Unknown to Ross
- Verified working set
Done. I have not found any regressions related to this change.
ABP 3.0.4.2042
Firefox 59 / 55 / 51 / Windows 10
Chrome 66 / 58 / 49 / Windows 7
Opera 52 / 45 / 36 / Windows 10
A commit referencing this issue has landed:
Issue 5760 - Use relative require