diff --git a/patches/chrome-browser-resources-tools-rollup_plugin.js.patch b/patches/chrome-browser-resources-tools-rollup_plugin.js.patch index 2d3d71c74c3..a2abd33fae4 100644 --- a/patches/chrome-browser-resources-tools-rollup_plugin.js.patch +++ b/patches/chrome-browser-resources-tools-rollup_plugin.js.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/resources/tools/rollup_plugin.js b/chrome/browser/resources/tools/rollup_plugin.js -index b541233a644bc428257dafcea7198d2d4a529d98..2ac54a0c01a953fd8d83a3a7cb94db410ff4899d 100644 +index b541233a644bc428257dafcea7198d2d4a529d98..793639a113a26f5488279f76c748cf197ee88aa2 100644 --- a/chrome/browser/resources/tools/rollup_plugin.js +++ b/chrome/browser/resources/tools/rollup_plugin.js @@ -71,6 +71,8 @@ export default function plugin(srcPath, genPath, rootPath, host, excludes) { return joinPaths(polymerSrcPath, pathFromPolymer); } -+ const resolvedByBrave = require(path.join(__dirname, '..', '..', 'brave_rollup_overrides')).braveResolveId({srcPath, genPath, excludes}, source, origin, relativePath, joinPaths, combinePaths, chromeResourcesUrl, schemeRelativeResourcesUrl, nonGeneratedFiles); if (resolvedByBrave) { return resolvedByBrave; } ++ const resolvedByBrave = require(path.join(__dirname, '..', '..', 'brave_rollup_overrides')).braveResolveId({srcPath, genPath, excludes}, source, origin, relativePath, joinPaths, combinePaths, chromeResourcesUrl, schemeRelativeResourcesUrl); if (resolvedByBrave) { return resolvedByBrave; } + // Get path from ui/webui/resources let pathFromResources = ''; diff --git a/ui/webui/resources/tools/brave_rollup_overrides.js b/ui/webui/resources/tools/brave_rollup_overrides.js index 9af881406d4..9905c36877a 100644 --- a/ui/webui/resources/tools/brave_rollup_overrides.js +++ b/ui/webui/resources/tools/brave_rollup_overrides.js @@ -1,7 +1,7 @@ const path = require('path'); module.exports = { - braveResolveId: function (params, source, origin, relativePath, joinPaths, combinePaths, chromeResourcesUrl, schemeRelativeResourcesUrl, nonGeneratedFiles) { + braveResolveId: function (params, source, origin, relativePath, joinPaths, combinePaths, chromeResourcesUrl, schemeRelativeResourcesUrl) { const {srcPath, genPath, excludes} = params; const resourcesSrcPath = joinPaths(srcPath, 'ui/webui/resources/'); const resourcesGenPath = joinPaths(genPath, 'ui/webui/resources/'); @@ -32,10 +32,6 @@ module.exports = { if (excludes.includes(fullPath)) { return {id: fullPath, external: true}; } - const filename = path.basename(source); - if (nonGeneratedFiles.includes(filename)) { - return joinPaths(resourcesSrcPath, pathFromBraveResources); - } // JS compiled into gen directory if (pathFromBraveResources.endsWith('.js')) { return joinPaths(braveResourcesGenPath, pathFromBraveResources);