You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From what I can tell, Playground is setup such that the site itself is
bundled, and separately it uses the babylonjs umd bundle for running the
actual user code in the Playground. Some the Playground website features
themselves seem to use @dev/core, and from what I can tell this is a
different copy of the code from core. For the inspector-v2 integration,
it was effectively also getting a copy of code from core, so the actual
classes inspector v2 was looking at were not the same as the ones coming
from the Playground user code (e.g. the objects had different prototype
chains). I updated the Playground webpack config to externalize any
`import { blah } from "core/blah"` to BABYLON for the inspector-v2 and
this fixes the problem. That said, it's unclear to me why we don't do
this for other features. Why does the Playground site ever need a
separate copy of things from core rather than just getting them through
the UMD bundle (e.g. BABYLON)? I tried to change it so that all
@dev/core and core imports are externalized to BABYLON, but this broke
all kinds of things. I don't really understand why, so for now I'm just
limiting the externalization to inspector-v2 (e.g. don't change anything
was already being packed before adding inspector-v2 to the mix). I'll
discuss more with Raanan when he's back.
Also added a VSCode task dependency on inspector-v2 watch to make sure
inspector v2 code changes are reflected in Playground.
0 commit comments