Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to host sandpack client at relative path #8251

Open
cryingpotat0 opened this issue Jan 7, 2024 · 2 comments
Open

Ability to host sandpack client at relative path #8251

cryingpotat0 opened this issue Jan 7, 2024 · 2 comments

Comments

@cryingpotat0
Copy link

cryingpotat0 commented 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 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?

@cryingpotat0 cryingpotat0 changed the title Ability to host at relative path Ability to host sandpack client at relative path Jan 7, 2024
@arcelan
Copy link

arcelan commented Jan 9, 2024

also come up into this issue

@iampava
Copy link

iampava commented Apr 26, 2024

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants