From 10533e28fa0caa7c74ebe517e043f28b7d8820b2 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Mon, 19 Feb 2024 16:53:32 +0900 Subject: [PATCH] fix: `error.html` path --- {src => assets}/error.html | 0 src/index.ts | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) rename {src => assets}/error.html (100%) diff --git a/src/error.html b/assets/error.html similarity index 100% rename from src/error.html rename to assets/error.html diff --git a/src/index.ts b/src/index.ts index b015d077..eaff07c2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -53,6 +53,8 @@ import { import { LoggerPrefix } from '@/utils'; import { loadI18n, setLanguage, t } from '@/i18n'; +import ErrorHtmlAsset from '@assets/error.html?asset'; + import type { PluginConfig } from '@/types/plugins'; if (!is.macOS()) { @@ -505,7 +507,7 @@ app.once('browser-window-created', (_event, win) => { if (errorCode !== -3) { // -3 is a false positive win.webContents.send('log', log); - win.webContents.loadFile(path.join(__dirname, 'error.html')); + win.webContents.loadFile(ErrorHtmlAsset); } }, );