sandpack
sandpack copied to clipboard
Add Solid Babel transform dependency
What kind of change does this pull request introduce?
Bug fix
What is the current behavior?
The current Solid template fails to run correctly:
https://sandpack.codesandbox.io/docs/getting-started/usage
Something went wrong
/App.tsx: _tmpl$ is not a function (4:2)
1 | import { Component } from "solid-js";
2 |
3 | const App: Component = () => {
> 4 | return <h1>Hello world</h1>
^
5 | };
6 |
7 | export default App;
What is the new behavior?
The template should be fixed
What steps did you take to test this? This is required before we can merge, make sure to test the flow you've updated.
I'm not sure how to test this! I've run it in a separate code sandbox and that worked. It also matches the dependencies in Ryan Carniato's example sandbox: https://codesandbox.io/s/solid-hello-world-9v13b
Checklist
- [ ] Documentation; N/A
- [ ] Storybook (if applicable); N/A
- [ ] Tests;
- [ ] Ready to be merged;
@joshpoll is attempting to deploy a commit to the CodeSandbox Team on Vercel.
A member of the Team first needs to authorize it.
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit b1165b0d8b4c4e45587b8e1cad120e0e0e0a724d:
Sandbox | Source |
---|---|
Sandpack | Configuration |
sandpack-run-stale-value | Configuration |
Solid Hello World | PR |
I noticed that there is a .babelrc
file in Ryan Carniato's example. However, in sandpack it doesn't seem to be necessary for some reason. Additionally, it actually seems to break the current version when I run it like this:
<Sandpack
template="solid"
files={{
"/.babelrc": {
code: `{
"presets": [
"babel-preset-solid"
]
}`,
},
}}
customSetup={{
dependencies: {
"babel-preset-solid": "1.6.16",
},
}}
/>
Without .babelrc
things seem to work fine.