Bug 1940141 - Move resourceUriPlugin from browser/components/newtab into a common location r=home-newtab-reviewers,omc-reviewers,mconley,emcminn

Differential Revision: https://phabricator.services.mozilla.com/D234066
This commit is contained in:
Punam Dahiya
2025-01-14 17:14:12 +00:00
parent d345c782ea
commit a0ac6c95d0
5 changed files with 6 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
const path = require("path"); const path = require("path");
const webpack = require("webpack"); const webpack = require("webpack");
const { ResourceUriPlugin } = require("../newtab/tools/resourceUriPlugin"); const { ResourceUriPlugin } = require("../../tools/resourceUriPlugin");
const PATHS = { const PATHS = {
// Where is the entry point for the unit tests? // Where is the entry point for the unit tests?

View File

@@ -4,7 +4,7 @@
const path = require("path"); const path = require("path");
const webpack = require("webpack"); const webpack = require("webpack");
const { ResourceUriPlugin } = require("../newtab/tools/resourceUriPlugin"); const { ResourceUriPlugin } = require("../../tools/resourceUriPlugin");
const PATHS = { const PATHS = {
// Where is the entry point for the unit tests? // Where is the entry point for the unit tests?

View File

@@ -4,7 +4,7 @@
const path = require("path"); const path = require("path");
const webpack = require("webpack"); const webpack = require("webpack");
const { ResourceUriPlugin } = require("./tools/resourceUriPlugin"); const { ResourceUriPlugin } = require("../../tools/resourceUriPlugin");
const PATHS = { const PATHS = {
// Where is the entry point for the unit tests? // Where is the entry point for the unit tests?

View File

@@ -4,7 +4,7 @@
const path = require("path"); const path = require("path");
const webpack = require("webpack"); const webpack = require("webpack");
const { ResourceUriPlugin } = require("./tools/resourceUriPlugin"); const { ResourceUriPlugin } = require("../../tools/resourceUriPlugin");
const absolute = relPath => path.join(__dirname, relPath); const absolute = relPath => path.join(__dirname, relPath);

View File

@@ -6,6 +6,7 @@
// and translating the uri into a relative filesytem path where the file may be // and translating the uri into a relative filesytem path where the file may be
// found when running within the Karma / Mocha test framework. // found when running within the Karma / Mocha test framework.
/* eslint-env node */
const path = require("path"); const path = require("path");
module.exports = { module.exports = {
@@ -29,6 +30,7 @@ module.exports = {
/** /**
* @param {object} options * @param {object} options
* Object passed during the instantiation of ResourceUriPlugin
* @param {ResourceReplacement[]} options.resourcePathRegExes * @param {ResourceReplacement[]} options.resourcePathRegExes
* An array of regex/string tuples to perform replacements on for * An array of regex/string tuples to perform replacements on for
* imports involving resource:// URIs. * imports involving resource:// URIs.