mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 09:45:52 +01:00
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:
@@ -25,3 +25,9 @@ document.addEventListener(
|
||||
},
|
||||
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
|
||||
});
|
||||
Reference in New Issue
Block a user