Skip to content

Can I import JS SDK in Sandpack? #599

Answered by danilowoz
Zih0 asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately, you can't load external scripts by injecting them into the head. This's a hard limitation on Sandpack, as described on #44, so you need to use externalResource to load these scripts.

Something like this: https://codesandbox.io/s/sandpack-monaco-editor-forked-g1skmw?file=/src/App.tsx:0-9

I wasn't able to make it fully work, but maybe you have another idea why. Hope it helps :)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Zih0
Comment options

Answer selected by Zih0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants