Remove what seems to be dead code (not used in the starter nor in onyxia, besite, looks fishy) '//TODO: Write a test case for this' for ref and .chunk.css",

This commit is contained in:
Joseph Garrone
2024-02-06 07:29:48 +01:00
parent 5076c1e93f
commit 4290cd23b2

View File

@ -84,12 +84,6 @@ export function replaceImportsInJsCode_webpack(params: { jsCode: string; buildOp
.replace(
new RegExp(`[a-zA-Z]+\\.[a-zA-Z]+\\+"${staticDir.replace(/\//g, "\\/")}`, "g"),
`window.${nameOfTheGlobal}.url.resourcesPath + "/${basenameOfTheKeycloakifyResourcesDir}/${staticDir}`
)
//TODO: Write a test case for this
.replace(
/".chunk.css",([a-zA-Z])+=[a-zA-Z]+\.[a-zA-Z]+\+([a-zA-Z]+),/,
(...[, group1, group2]) =>
`".chunk.css",${group1} = window.${nameOfTheGlobal}.url.resourcesPath + "/${basenameOfTheKeycloakifyResourcesDir}/" + ${group2},`
);
return { fixedJsCode };