1.0.0
Breaking: The initRemix()
function now accepts the server build instead of the remix config. This update allows using Remix's server build feature with the virtual import; you can now more easily write the electron entry in TS!
// desktop/main.ts
import * as serverBuild from "@remix-run/dev/server-build"
import { initRemix } from "remix-electron"
// ...
const url = await initRemix({ serverBuild })
await createWindow(url)
// remix.config.js
/**
* @type {import('@remix-run/dev/config').AppConfig}
*/
module.exports = {
appDirectory: "app",
assetsBuildDirectory: "public/build",
publicPath: "/build/",
server: "desktop/main.ts",
serverBuildPath: "desktop/build/index.js",
devServerPort: 8002,
ignoredRouteFiles: [".*"],
}