-
Notifications
You must be signed in to change notification settings - Fork 309
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
Finish implementing the Playground #732
Comments
Hi Naman! Myself and two other MLH Fellows—@6ri4n and @p0nch000—are working on implementing the rest of the playground. However, we have a few questions:
|
I just updated #12 to fix build. nThis should help some of the problems, but other problems will remain. For the most part, see https://webcontainers.io/guides/quickstart#cross-origin-isolation for help troubleshooting.
This wasn't easy and I had trouble making this work locally. The general steps are:
However, webcontainer require Every StyleX PR auto deploys and the test link: https://stylex-git-better-playground-fbopensource.vercel.app/playground/ Shows the webcontainer set up mostly working correctly. Although I AM also seeing the Rollup error.
I'm not sure, I don't see these errors, although I do see different errors which are all related to
If you get the webcontainer working correctly and set it up to compile the StyleX code within correctly, this problem should go away. Months ago I had this working, but you might need to update some of the "Playground" code to get to work without errors again.
Again, once you fix the "Playground" setup, these errors should go away. |
OK. I made another update to the PR and things should be functional now.
After $ npm run build && npm run serve Unfortunately, I have not found a way to make Docusaurus's hot reload work with the WebContainers. So, you have to do the build and serve from scratch after every code change to test locally. Outside of that the errors should be fixed and you should get a successful blue "hello world" bar to render. There are some pretty big issues still:
I would recommend trying to take the entire "files" section of the playground to a standalone project, getting that to work correctly and then bringing it back in so you can then focus on the UI for the playground. Since we want a preview of compiling each individual file, it will be useful to change up the setup to use something other than the basic Rollup setup. (It might be OK to add an additional script to compile each JS file with JS individually as needed. |
The StyleX website has an empty page for a playground. This can be implemented using "WebContainers".
A basic playground should ship React, StyleX and a simple bundler. It should have four panes:
The text was updated successfully, but these errors were encountered: