Skip to content

Commit

Permalink
try to fix resource path
Browse files Browse the repository at this point in the history
  • Loading branch information
orzogc committed Aug 15, 2023
1 parent 18846cb commit facfc7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/neotool/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tauri-build = { version = "1.4.0", features = [] }
[dependencies]
serde.workspace = true
serde_json.workspace = true
tauri = { version = "1.4.1", features = [ "protocol-asset", "devtools", "fs-all", "path-all"] }
tauri = { version = "1.4.1", features = [ "devtools", "fs-all", "linux-protocol-headers", "path-all", "protocol-asset"] }
tauri-plugin-acfunlive-neotool-base = { version = "0.1.0", path = "../../../plugins/tauri-plugin-acfunlive-neotool-base" }
tauri-plugin-acfunlive-neotool-keyboard = { version = "0.1.0", path = "../../../plugins/tauri-plugin-acfunlive-neotool-keyboard" }
tauri-plugin-websocket = { git = "https://github.com/orzogc/plugins-workspace.git", branch = "ac-live-fix" }
Expand Down
5 changes: 3 additions & 2 deletions packages/neotool/src/lib/scripts/load.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { AppShared } from '@acfunlive-neotool/shared';
import { convertFileSrc } from "@tauri-apps/api/tauri";
import { BaseDirectory, createDir, exists, readTextFile, writeTextFile } from '@tauri-apps/api/fs';
import { join } from '@tauri-apps/api/path';
import {
Expand Down Expand Up @@ -44,9 +45,9 @@ export async function loadApp(
cssPath?: string
): Promise<void> {
if (cssPath) {
await import(cssPath);
await import(convertFileSrc(cssPath));
}
const module = await import(jsPath);
const module = await import(convertFileSrc(jsPath));
const component = module.default;

new component({
Expand Down

0 comments on commit facfc7e

Please sign in to comment.