fix(preview): add missing font MIME types to web server

- Added MIME type mappings for .otf, .woff, and .woff2 font formats
- Fixed missing break statement after .wav case (was falling through to .mp4)
- Fonts now load correctly in editor preview without 404 errors
- Resolves OTS parsing error messages in console

The web server was already serving project directory files correctly,
but browsers were rejecting font files due to missing/incorrect MIME types.

Related to TASK-006
This commit is contained in:
Richard Osborne
2025-12-15 22:57:48 +01:00
parent 0b47d19776
commit ea45e8b3a3
22 changed files with 5510 additions and 364 deletions

View File

@@ -102,7 +102,10 @@ export default class Inspector {
//walk the dom tree upwards until a dom element with react state is found
let domFiber;
while (!domFiber && dom) {
const key = Object.keys(dom).find((key) => key.startsWith('__reactInternalInstance$'));
// React 18 changed from __reactInternalInstance$ to __reactFiber$
const key = Object.keys(dom).find((key) =>
key.startsWith('__reactFiber$') || key.startsWith('__reactInternalInstance$')
);
domFiber = dom[key];
if (!domFiber) dom = dom.parentElement;
}