Yes great use case, I updated to be able to parse @version suffixes so we can pin versions of modules that we’re importing. It can be used with @babylonjs/core although importing the whole core package in dynamically in runtime gets a bit wonky, would have to work on optimizing that path.
I’ve also got a “local package development” sync option with Monaco’s code lens. You can sync a directory you’re working from locally and it will pull in that package for types and in the code and will automatically grab the latest version every time the code is run – great for when developing BJS npm modules and iterating quickly in the PG.
Asks for a local module directory:
After providing the directory, types and package works in the runtime:
The more complicated example I’ll be working off of is from this original post 10k+ Instances with MSDF Text Nameplates and inline WASM compilation that sort of triggered this whole chain of events for multi files.
I’ll be posting a video updating the status of the shader-object npm package in that thread but in the meantime here is a Playground showing how pinning a version is working:
Inside actorPool.ts:


