Get an offscreen canvas renderloop working in a PG?

I am trying to get a offscreen scene rendering in a Playground, but it looks like the worker does not have access to any of the BABYLON classes.

This is a continuation of:

Is there a better way to do this that will get the loop to run? I’m trying to make a proof of concept for something and this is a blocker.

your worker needs to load the various babylon scripts as well

Yeah but how? I know they do but it does not have access to imports or require and no scope to BABYLON like the Playground has. If it does then Im not sure how.

you need to use importScripts in your js