braebo / sveltekit-electron

Minimal Sveltekit + Electron starter template.
MIT License
269 stars 27 forks source link

Add `preload.ts` #9

Closed bato3 closed 2 years ago

bato3 commented 3 years ago

Because require() isn't allowed in render context, I suggest adding the preload script.

The procedure is not complicated for js, but doing it for ts can be problematic. (Electron require plain js)

braebo commented 2 years ago

Hey @bato3 - thanks for the heads up! If you've added this already, would you mind submitting a PR?

bato3 commented 2 years ago

@FractalHQ I would only be able to do for .js. .ts exceeds my capabilities...

braebo commented 2 years ago

Hopefully #21 solves this for you!