mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-02 01:17:58 +02:00
* chore: update changelog * chore: update changelog * feat: format asset paths and insert baseUri in html * feat: add tests * feat: pass dependencies to pre router hook Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
8 lines
258 B
TypeScript
8 lines
258 B
TypeScript
export const rewriteHTML = (input: string, rewriteValue: string): string => {
|
|
let result = input;
|
|
result = result.replace(/::baseUriPath::/gi, rewriteValue);
|
|
result = result.replace(/\/static/gi, `${rewriteValue}/static`);
|
|
|
|
return result;
|
|
};
|