mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-04 12:49:03 +00:00
fix: do not inject to sqlite srcs, fixes infinite loading
This commit is contained in:
parent
f61d13ca91
commit
705ba509cb
17
src/init.js
17
src/init.js
@ -19,7 +19,24 @@ if (isElectron()) {
|
||||
const { enhancerUrl } = globalThis.__enhancerApi,
|
||||
{ getMods, isEnabled, modDatabase } = globalThis.__enhancerApi;
|
||||
|
||||
// calling require("electron") in a process require()-d
|
||||
// from these paths throws "websocket connection to __ failed"
|
||||
// and triggers infinite loading => ignore for now, but
|
||||
// requires further investigation later
|
||||
const ignoredPaths = [
|
||||
"shared/sqliteTypes",
|
||||
"shared/TimeSource",
|
||||
"shared/retryHelpers",
|
||||
"shared/PromiseUtils",
|
||||
"shared/typeUtils",
|
||||
"shared/utils",
|
||||
"shared/sqliteHelpers",
|
||||
"main/sqlite/SqliteConnectionWrapper",
|
||||
"main/sqlite/SqliteServer",
|
||||
];
|
||||
|
||||
module.exports = async (target, __exports, __eval) => {
|
||||
if (ignoredPaths.includes(target)) return;
|
||||
if (target === "main/main") require("./worker.js");
|
||||
|
||||
// clientStyles
|
||||
|
Loading…
Reference in New Issue
Block a user