Repository navigation
|
I tried to import google maps sdk. https://codesandbox.io/s/sandpack-monaco-editor-forked-kcr96c?file=/src/App.tsx https://codesandbox.io/embed/github/googlemaps/js-samples/tree/sample-map-simple |
Answered by
danilowoz
Oct 4, 2022
Replies: 1 comment 1 reply
|
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 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 :) |
1 reply
Answer selected by
Zih0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
externalResourceto 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 :)