Self Host Sandpack still making connections to other websites #9569
Unanswered
tatwong
asked this question in
Troubleshooting
Replies: 1 comment 1 reply
-
Self-hosting the bundler only handles compilation, and npm packages still get fetched externally. Since LC uses the default React template, external requests are expected behavior. To avoid this, you'd need to create a custom Sandpack configuration in a fork and pre-bundle any libraries you want to use locally. See the official example - it shows bundling dependencies with tsup and including them as local files: files={{
"/node_modules/@internals/ds/package.json": { hidden: true, code: JSON.stringify({...}) },
"/node_modules/@internals/ds/index.js": { hidden: true, code: bundledCode },
}} See #793 for more info. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Seems like Self Hosting Sandpack still making external request, and I am not expecting this.
Version Information
I have already done the Self Hosting Sandpack using the instructions from here:
https://github.com/LibreChat-AI/static-browser-server/tree/main
https://github.com/LibreChat-AI/codesandbox-client
However, when we are doing network tracing, it seems like it is still making calls to external websites:
Steps to Reproduce
What browsers are you seeing the problem on?
Chrome
Relevant log output
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions