sandpack
sandpack copied to clipboard
Console not working on static template
Bug report
Packages affected
- [x] sandpack-client
- [x] sandpack-react
Description of the problem
The Sandpack console does not appear to be working with static templates.
What were you doing when the problem occurred?
I am using the Sandpack React component with a static template to render some HTML and JavaScript. I am loading a script with a console.log
which I would expect to show up in the console.
What steps can we take to reproduce the problem?
Here's a CodeSandbox with a replication of the issue.
Your Environment
Software | Name/Version |
---|---|
Sandpack-client version | 2.6.0 |
Sandpack-react version | 2.6.0 |
Browser | |
Operating System |
I have added your feature request to our internal backlog which we use to prioritize what to build next. We can't make any promises about the timing, but it's on the list!
For others landing on this issue, feel free to add more context or simply leave a thumbs up 👍 on this comment if you find this feature useful.
Thanks @danilowoz - appreciate it. If I can just add a little more context:
I am using Sandpack to create a basic code playground, where users can write HTML, CSS and JavaScript. Being able to present console messages to users in the UI, similar to how CodeSandbox do it, would be super helpful.
FWIW, I logged this as a bug rather than a feature request because it doesn't mention anywhere that the sandpack console will not work with the static template - I can create a PR that adds some messaging around this on the docs if that would be useful?
Hey, @KenanYusuf. Thanks for the further information. I believe adding a limitation message on the documentation sounds like a wise change. Can you open a PR for that?