solidjs icon indicating copy to clipboard operation
solidjs copied to clipboard

[Bug] 1.0.0-beta.7 requires React

Open dylang opened this issue 9 months ago • 7 comments

Describe the bug

ReferenceError: React is not defined

Steps to reproduce the behavior

  1. Install 1.0.0-beta.7
  2. pnpm start

See the diff, React.createElement is only in the new (green) code: from=1.0.0-beta.6&to=1.0.0-beta.7

Expected behavior

Use Solid instead of React 😏

dylang avatar Apr 07 '25 00:04 dylang

Could the issue be related to moving the Solid Vite plugin to peer dependencies? https://github.com/storybookjs/solidjs/pull/20/files#diff-730fd4c7b34312c96f9efc915fa4a34d6538a7a710e77c092611f433f666172b

UPD: probably unrelated, as the build script for packages uses esbuild instead

Chudesnov avatar Apr 07 '25 10:04 Chudesnov

I'm 99% sure this caused the bug https://github.com/storybookjs/solidjs/blob/b5346198cbfe6589afa72724c7cc8ae979172e1d/scripts/prepare/build.ts#L128-L137

Used to be esbuildPlugins before (the supported API in tsup for augmenting esbuild behavior)

https://github.com/egoist/tsup/blob/769aa49cae16cc1713992970db966d6514878e06/src/esbuild/index.ts#L149

https://github.com/storybookjs/solidjs/commit/b5346198cbfe6589afa72724c7cc8ae979172e1d#diff-72de4d2d3868dab4f2955ea622e20764e0c84a31060694ff01fdf2cb8550d4ffL128-R162

Chudesnov avatar Apr 07 '25 12:04 Chudesnov

When I switched it back to "tsup": "^8.3.0", and used esbuildPlugins rather than plugins the example storybook works again.

LiamKarlMitchell avatar Apr 09 '25 10:04 LiamKarlMitchell

+1

Hdnaye avatar Apr 24 '25 07:04 Hdnaye

Looks like the maintainers don't care about this project anymore, so I've decided to take it into my own hands and fork it. What I did is create-solid-storybook. It should be the easiest way to set up Storybook with SolidJS. You can try it and give me some feedback, I'm appreciate it.

kachurun avatar May 25 '25 20:05 kachurun

@JReinhold @webblocksapp Needs a maintainer.

LiamKarlMitchell avatar May 25 '25 23:05 LiamKarlMitchell

@LiamKarlMitchell @JReinhold @webblocksapp

I'm ready for this https://github.com/storybookjs/storybook/discussions/31564

kachurun avatar May 26 '25 04:05 kachurun