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

Exports the Solid Playground for use in Docs #70

Closed
wants to merge 3 commits into from
Closed

Conversation

Jutanium
Copy link
Contributor

If I was a better open-source denizen, this would be a far more detailed write-up explaining everything that @modderme123 did, but because I don't understand everything that Milo did and I don't want to bug him to write it up, I'm going to summarize:

  • The Solid Playground/repl project exports a Repl component that works independently to the Solid Playground site
  • Because this relies on web workers and document, it doesn't work nicely in Solid Start, which doesn't allow stubs (this was a concept Milo taught me)
  • To fix this, Milo effectively replaced the imports when the code runs on the server.

@netlify
Copy link

netlify bot commented Jun 24, 2022

Deploy Preview for solid-docs failed.

Name Link
🔨 Latest commit da7a79b
🔍 Latest deploy log https://app.netlify.com/sites/solid-docs/deploys/62b60ea52f4e28000aeb0792

Copy link
Contributor

@crutchcorn crutchcorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, some minor thoughts (non blocking):

  • @Jutanium raised concern that "solid-start" should have a way to run code on client. While this is true, this is similar to how I'd write this within NextJS
  • Future versions of MyRepl would be nice to grab files from a file's contents. I'm sure that's the next step.

Overall, let's gooo

@milomg
Copy link
Member

milomg commented Jun 25, 2022

What do you mean by grab files from a file's contents? Do you mean allowing passing https://github.com/solidjs/solid-docs-next/blob/playground-test/src/components/repl.tsx#L49-L68 as a parameter?

@crutchcorn
Copy link
Contributor

@modderme123 exactly right. I'm not worried about it as a blocker for this PR

@milomg
Copy link
Member

milomg commented Jul 7, 2022

My current guess is that the build issue has to do with us running two rollup instances in parallel for two worker imports, and then rollup gets confused that it is called twice and has some outstanding async plugins that are actually for another rollup instance

Some issues that we ran into with rollup and parallelism are described here: vitejs/vite#2689, maybe those would be useful if anyone is willing to help debug this.

@milomg
Copy link
Member

milomg commented Aug 6, 2022

Ok, the linked thread says that terser breaks everything without extremely careful work (and I no longer remember what), so someone might try disabling terser in solid-start to see if that works

@LadyBluenotes LadyBluenotes deleted the playground-test branch July 22, 2023 21:15
madaxen86 pushed a commit to madaxen86/solid-docs-next that referenced this pull request Aug 16, 2024
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.

4 participants