solid-refresh icon indicating copy to clipboard operation
solid-refresh copied to clipboard

ref ins rsbuild failed

Open 6643 opened this issue 1 year ago • 4 comments

Describe the bug

I saw this in solidjs-use. But failed in rsbuild. I don't know the reason why this report is wrong. Solidjs-use is written wrong. Or. Rsbuild was wrong. https://github.com/web-infra-dev/rsbuild/issues/1963

Your Example Website or App

https://github.com/web-infra-dev/rsbuild/issues/1963

Steps to Reproduce the Bug or Issue

https://github.com/web-infra-dev/rsbuild/issues/1963

Expected behavior

https://github.com/web-infra-dev/rsbuild/issues/1963

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

6643 avatar Mar 30 '24 02:03 6643

This might be a bug of solid-refresh v0.7.5, see https://github.com/web-infra-dev/rsbuild/issues/1963 for details.

chenjiahan avatar Mar 31 '24 08:03 chenjiahan

@lxsmnsyc can you comment on this?

ryansolid avatar Apr 08 '24 18:04 ryansolid

this happens to us too using esbuild. here's a comment + workaround from our repo:

            // the solid-js transform for refs assumes its input is mutable, ie. not const:
            // esbuild converts this for us in production builds, but it happens
            // too late in the process for unbundled builds like this one. So
            // instead we'll use babel to convert down to var scoped variables.
            ['@babel/plugin-transform-block-scoping'],
            [babelFastRefreshPlugin, cSolidRefreshOptions],
            [jsxTransform, cSolidOptions],

When I originally wrote this comment I may have blamed the base jsx transform rather than the refresh plugin, but it is true that this only happens when the refresh plugin is included!

Alloyed avatar Apr 09 '24 16:04 Alloyed

Ok then lets move this to refresh.

ryansolid avatar Apr 22 '24 17:04 ryansolid