-
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 |
Beta Was this translation helpful? Give feedback.
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 :) |
Beta Was this translation helpful? Give feedback.
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 :)