You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there! I'm trying to self-host the codesandbox client (yarn build:sandpack) under a relative path in my domain. I want to do this to bypass some cross-origin iframe restrictions and interact with the compiled javascript code. I tried changing publicPath and setting CODESANDBOX_ROOT, but still ran into some things I had to manually patch. In particular I had to run the following sed commands (I hosted the client under the /www subpath):
yarn build:sandpack
LC_ALL=C find . -type f -exec sed -i '' 's/\/static/\/www\/static/g' {} +
LC_ALL=UTF-8 find . -type f -exec sed -i '' 's/\/babel-transpiler.e23522c3.worker.js/\/www\/babel-transpiler.e23522c3.worker.js/g' {} +
I'd imagine as I use more features (e.g. scss compilers) I'd have to run more sed commands which isn't ideal. Is there something I'm missing on how to do this? If not, could a way be added to host the sandpack client under a subdomain?
The text was updated successfully, but these errors were encountered:
cryingpotat0
changed the title
Ability to host at relative path
Ability to host sandpack client at relative path
Jan 7, 2024
Hi there! I'm trying to self-host the codesandbox client (
yarn build:sandpack
) under a relative path in my domain. I want to do this to bypass some cross-origin iframe restrictions and interact with the compiled javascript code. I tried changingpublicPath
and settingCODESANDBOX_ROOT
, but still ran into some things I had to manually patch. In particular I had to run the followingsed
commands (I hosted the client under the/www
subpath):I'd imagine as I use more features (e.g.
scss
compilers) I'd have to run more sed commands which isn't ideal. Is there something I'm missing on how to do this? If not, could a way be added to host the sandpack client under a subdomain?The text was updated successfully, but these errors were encountered: