diff options
| author | AAGaming <aagaming@riseup.net> | 2024-05-29 21:01:49 -0400 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2024-05-29 21:01:49 -0400 |
| commit | 2b4e3318ca2d221656d862a6524b076da820b78b (patch) | |
| tree | b38d17ff42ed95a5f0bdedf02b82a14425e7d386 /frontend/src/index.ts | |
| parent | b84dcd99adbffcc2710fb916c35f698dc57fea2c (diff) | |
| download | decky-loader-2b4e3318ca2d221656d862a6524b076da820b78b.tar.gz decky-loader-2b4e3318ca2d221656d862a6524b076da820b78b.zip | |
fix latest betav2.12.1-pre1
VALVEEEEE
Diffstat (limited to 'frontend/src/index.ts')
| -rw-r--r-- | frontend/src/index.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/frontend/src/index.ts b/frontend/src/index.ts index 6588cb5c..0faea32c 100644 --- a/frontend/src/index.ts +++ b/frontend/src/index.ts @@ -1,5 +1,13 @@ // Sets up DFL, then loads start.ts which starts up the loader (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'); |
