← Back to community index
# contributor·Active

! Rushabh | Linux Shill - quick question: do we...

quick question: do we need to add add poppygl to @tscircuit/internal dynamic import

Started by ! Rushabh | Linux ShillJul 10, 202625 messages

Discussion

Last active 3 days ago · plain text
! Rushabh | Linux Shilloriginal post
quick question: do we need to add add `poppygl` to `@tscircuit/internal-dynamic-import`
! Rushabh | Linux Shill
<@757706909351411845> <@778624824875941908>
shibo
did you face an issue?
! Rushabh | Linux Shill
yeah
! Rushabh | Linux Shill
`circuit-json-to-3d-png` uses it in tscircui.com
Seve
yea i think that's fine, there's no issues with adding additional things to be dynamically imported i think
! Rushabh | Linux Shill
``` Error Downloading 3d PNG Error: Failed to download 3d PNG: TypeError: Failed to fetch dynamically imported module: https://jscdn.tscircuit.com/poppygl/latest/+esm ```
Seve
no downside really as long as it's dynamically loaded in browsers only
Seve
oh hmm
Seve
that seems like an issue with the jscdn not poppygl
Seve
that's a jscdn issue
Seve
do you have access https://github.com/tscircuit/jscdn.tscircuit.com
! Rushabh | Linux Shill
yeah
! Rushabh | Linux Shill
i wanted to do something like this ```ts await Promise.all([ loadCircuitJsonConverter("circuit-json-to-gltf"), loadCircuitJsonConverter("poppygl"), ]) return loadCircuitJsonConverter<CircuitJsonTo3dPngModule>( "circuit-json-to-3d-png", ) ```
! Rushabh | Linux Shill
but this does not make sense
! Rushabh | Linux Shill
i am confused
! Rushabh | Linux Shill
wait, lemm me cook
! Rushabh | Linux Shill
will report later
! Rushabh | Linux Shill
so, for step we do this ```ts const ensureCircuitJsonToGltfLoaded = async (): Promise<CircuitJsonToGltfModule> => { return loadCircuitJsonConverter<CircuitJsonToGltfModule>( "circuit-json-to-gltf", ) } export const loadCircuitJsonToStep = async (): Promise<CircuitJsonToStepModule> => { // circuit-json-to-step dynamically imports circuit-json-to-gltf at runtime. await ensureCircuitJsonToGltfLoaded() return loadCircuitJsonConverter<CircuitJsonToStepModule>( "circuit-json-to-step", ) } ``` we can do similar pr `poppygl` if it is in `@tscircuit/internal-dynamic-import` wdyt
! Rushabh | Linux Shill
<@778624824875941908>
shibo
no idea, <@398467566588264449> I think has a better idea about this repo
Abse
<@757706909351411845> can you check this, don't know how jscdn work
Seve
hello
Seve
i think the fix is in the jscdn mostly
Seve
if you fix the underlying jscdn bug, you don't need to orchestrate installations IIUC

Want to add to the conversation?

Reply in Discord so your notes stay connected to the source.
Continue in Discord ↗