Move resourceUriPlugin from browser/components/newtab into a common location
Categories
(Firefox :: New Tab Page, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox136 | --- | fixed |
People
(Reporter: mconley, Assigned: pdahiya)
References
(Blocks 1 open bug)
Details
(Whiteboard: [hnt-trainhop])
Attachments
(1 file)
It looks like the newtab, asrouter and aboutwelcome test and packaging infrastructure all rely on this resourceUriPlugin.js script here.
We should move that out into its own common location. Maybe browser/tools
, but I'm open to alternatives... one thing I'm noodling on, is that Storybook probably needs to do this kind of thing too. Maybe the ReComp team already have a script like this somewhere that we can re-use instead?
Updated•1 month ago
|
Reporter | ||
Comment 1•1 month ago
|
||
Hey hjones! Does Storybook have some kind of webpack-y plugin stuff for turning resource:// URIs into file paths somewhere?
Comment 2•1 month ago
|
||
Interesting! We do have something conceptually similar that we use to map chrome://
URIs to the path on disk. It might also work for resource://
URIs, but I expect it's pretty heavy handed for your needs...
The plugin entrypoint is here and the chrome URI rewriting logic lives here. It all relies on having a chrome-map.js
file which we generate via the build command, but don't check in (because it's massive...). It looks like chrome-map.js
does contain resource://
URIs but it feels like overkill to generate that file if you don't also need to rewrite chrome://
paths.
Reporter | ||
Comment 3•1 month ago
|
||
Okay, thanks, hjones!
Hey pdahiya, maybe for now, we might consider moving resouceUriPlugin under, say, browser/tools
?
Assignee | ||
Comment 4•1 month ago
|
||
Assignee | ||
Comment 5•1 month ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) from comment #3)
Okay, thanks, hjones!
Hey pdahiya, maybe for now, we might consider moving resouceUriPlugin under, say,
browser/tools
?
Sounds good, attached patch moving resouceUriPlugin under browser/tools
thanks!
Updated•1 month ago
|
Comment 7•29 days ago
|
||
bugherder |
Description
•