codesandbox / codesandbox/codesandbox-client
Astro Support
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13.6k
- Forks
- 2.4k
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 2
Description
🌈 Feature
👋🏻 Hey, thanks for all your work on CodeSandbox—it is a great platform!
I'm a core maintainer of Astro and while it's still very early for our tool, we'd love to be able to use CodeSandbox to speed up our development cycle! Hosted issue reproductions and forkable documentation examples would be invaluable for our team.
The good news is, Astro mostly works in our template! There are a few features that would make this even better.
- Support for
.astrofiles. Obviously this is a new format, but we have syntax highlighting and Intellisense with the official Astro extension. It would be great to at least pull in the syntax highlighting, if possible. - Mapping
.astrofiles to Current Module View. We have file-based routing based on the contents of thesrc/pages/**/*directory. - HMR doesn't seem to work. Is there something we need to update on our end? I'm having trouble tracking it down, but our main server runs on port
3000while our HMR websocket runs on12321. I see this message in the browser console, but I know we're not sending anypostMessagerequests so I'm not sure where those are coming from.
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://hugb3-12321.sse.codesandbox.io') does not match the recipient window's origin ('https://hugb3.sse.codesandbox.io').
C @ codesandbox.io/stati…39463744f3b89f84a:1
Please let me know if there's anything you need from our end—we'd love to be able to integrate CodeSanbox into our onboarding experience and documentation as much as possible.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Astro template and compare its behavior in CodeSandbox. Investigate support for .astro files, mapping src/pages/**/* to Current Module View, and HMR when the server uses port 3000 and the websocket uses port 12321. Done means syntax highlighting, module mapping, and HMR work for the described Astro setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100