solidjs / solidjs/solid-playground

Playground miscompiling code - force including solid-js/web

Open
#175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
244
Forks
69
PR merge metrics
No merged PRs in 30d

Description

I work on the Solid Lightning and added the universal rendering support.

I have the playground working with:

import { renderSync as render, View, Text,  startLightning } from "@lightningjs/solid"

await startLightning();

render(() => (
  <View width="1920" height="1080">
    <View width="800" height="350" color="0x4169e1ff"/>
    <Text>Hello World</Text>
  </View>
));

Setting output to universal mode.

However, when I replace View or Text function component with node or text (simple element) like so:

import { renderSync as render, View, Text,  startLightning } from "@lightningjs/solid"

await startLightning();

render(() => (
  <View width="1920" height="1080">
    <View width="800" height="350" color="0x4169e1ff"/>
    <text>Hello World</text>
  </View>
));

The output shows correctly:

image

But when the code runs however, it doesn't work and the debugger shows the code as:

Screenshot 2024-04-24 at 7 38 31 AM

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by tracing the playground's universal-mode compilation path and compare generated output for the component and lowercase-element examples; inspect where solid-js/web imports are included. Done means the runtime output matches the displayed universal output for both examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.