mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 02:22:01 +00:00
18 lines
675 B
TypeScript
18 lines
675 B
TypeScript
// Sets up DFL, then loads start.ts which starts up the loader
|
|
interface Window {
|
|
SP_REACTDOM: any;
|
|
}
|
|
(async () => {
|
|
if (!window.SP_REACT) {
|
|
console.debug('Setting up React globals...');
|
|
// deliberate partial import
|
|
const DFLWebpack = await import('decky-frontend-lib/dist/webpack');
|
|
// TODO move these finds to dfl in v4
|
|
window.SP_REACT = DFLWebpack.findModule((m) => m.Component && m.PureComponent && m.useLayoutEffect);
|
|
window.SP_REACTDOM = DFLWebpack.findModule((m) => m.createPortal && m.createRoot);
|
|
}
|
|
console.debug('Setting up decky-frontend-lib...');
|
|
window.DFL = await import('decky-frontend-lib');
|
|
await import('./start');
|
|
})();
|