chore(app/share): add workaround for dead code eliminination by webpack

since fetchNote function is not used anywhere, webpack will treat it as "dead code" and remove it from the final output

I did not have any success with using webpack config flags like "sideEffects", so I've reverted to this workaround for now
This commit is contained in:
Panagiotis Papadopoulos 2025-01-26 21:23:08 +01:00
parent 3ed9528495
commit 74f6ad46ae

View File

@ -25,3 +25,9 @@ document.addEventListener(
}, },
false false
); );
// workaround to prevent webpack from removing "fetchNote" as dead code:
// add fetchNote as property to the window object
Object.defineProperty(window, "fetchNote", {
value: fetchNote
});