Joshua's Docs - CodeSandbox - Miscellaneous Notes
Light

📘 👉 CodeSandbox Documentation

Template Types

See Configuration Doc and ITemplate type definition

Troubleshooting

  • Format options seem to have no effect (.prettierrc)
    • For IDE formatting, you can use ./vscode/settings.json, just like you can with a local VSCode install. I found this worked instantly
  • For a static HTML project, subfolders are not serving in the live view
    • CodeSandbox seems to have a lot of issues with static HTMl content and the default static serve template
    • You could try switching to a Node powered project
    • You could try changing the default start command from serve to serve .
  • If Jest / tests don't seem to be working, and/or you are getting errors about packages related to NodeJS, make sure that your sandbox is using the right type - e.g., that it is running with a full NodeJS container if it needs to be.
    • If CodeSandbox is detecting the wrong container / environment, you can force it to use the correct one by creating a sandbox.config.json file in the root of your repo before cloning to CodeSandbox, and having "template": "node" as a key-pair.
Markdown Source Last Updated:
Fri May 28 2021 12:19:02 GMT+0000 (Coordinated Universal Time)
Markdown Source Created:
Mon Nov 23 2020 14:48:46 GMT+0000 (Coordinated Universal Time)
© 2024 Joshua Tzucker, Built with Gatsby
Feedback