You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
494 B
18 lines
494 B
import { is } from "@electron-toolkit/utils"
|
|
import { join } from "path"
|
|
import { slash } from "./url"
|
|
|
|
export function getFileUrl(app: string) {
|
|
let winURL = ""
|
|
if (is.dev && process.env["ELECTRON_RENDERER_URL"]) {
|
|
winURL = process.env["ELECTRON_RENDERER_URL"] + `/${app}#/`
|
|
} else {
|
|
winURL = join(__dirname, `../renderer/${app}#/`)
|
|
}
|
|
return slash(winURL)
|
|
}
|
|
|
|
export function getPreloadUrl(file) {
|
|
return join(__dirname, `../preload/${file}.js`)
|
|
}
|
|
|