mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08: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:
parent
3ed9528495
commit
74f6ad46ae
@ -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
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user