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

Add Solid Babel transform dependency #964

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joshpoll
Copy link

@joshpoll joshpoll commented Jul 6, 2023

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

Screen Shot 2023-07-06 at 11 30 11 AM
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;

@vercel
Copy link

vercel bot commented Jul 6, 2023

@joshpoll is attempting to deploy a commit to the CodeSandbox Team on Vercel.

A member of the Team first needs to authorize it.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 6, 2023

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 b1165b0:

Sandbox Source
Sandpack Configuration
sandpack-run-stale-value Configuration
Solid Hello World PR

@joshpoll
Copy link
Author

joshpoll commented Jul 6, 2023

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",
    },
  }}
/>
Screen Shot 2023-07-06 at 11 59 44 AM

Without .babelrc things seem to work fine.

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

Successfully merging this pull request may close these issues.

None yet

1 participant