Get dependencies to be used across the page (not just within Sandpack preview) #467
Unanswered
davidfloegel
asked this question in
Q&A
Replies: 1 comment
-
I don't fully understand what you're trying to do here, but you can specify the same version in the pkg.json as you use for the other places and than they should use the same file. Any more information would be useful to help here |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
This is a slightly tricky question but I wonder whether Sandpack could be of use.
I'm building a little project where it is necessary for the user to add npm packages to the site.
The user is able to write content in MDX and include code samples, so I need to inject the components they have listed into the provider so that they can be rendered live into the page.
Currently, I'm simply appending the UNPKG URL to the
<head>
but this is causing some issues.I think Sandpack would be ideal for this especially once Typescript support is done etc!
I'm imagining something like this:
Is that something I can do with Sandpack yet or might be possible in the future? I know Sandpack uses an iframe for the code renderer so this might cause issues but thought I'd ask.
Best wishes and thanks!
Beta Was this translation helpful? Give feedback.
All reactions