Switch main's route handlers to be static functions (#2712)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-05-12 08:08:42 -04:00
1 parent b373411a16
commit f4ff28e51c
11 files changed
+173 -196

No files matched your search

+4 -4
View File
@@ -30,11 +30,11 @@ export const webpackDevServerPort = 9009;
// Special runtime paths
defineGlobal("__static", {
get() {
if (isDevelopment) {
return path.resolve(contextDir, "static");
}
const root = isDevelopment
? contextDir
: (process.resourcesPath ?? contextDir);
return path.resolve(process.resourcesPath, "static");
return path.resolve(root, "static");
}
});