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

ref ins rsbuild failed #66

Closed
6643 opened this issue Mar 30, 2024 · 4 comments · Fixed by #70
Closed

ref ins rsbuild failed #66

6643 opened this issue Mar 30, 2024 · 4 comments · Fixed by #70

Comments

@6643
Copy link

6643 commented Mar 30, 2024

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.
web-infra-dev/rsbuild#1963

Your Example Website or App

web-infra-dev/rsbuild#1963

Steps to Reproduce the Bug or Issue

web-infra-dev/rsbuild#1963

Expected behavior

web-infra-dev/rsbuild#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

@chenjiahan
Copy link

This might be a bug of solid-refresh v0.7.5, see web-infra-dev/rsbuild#1963 for details.

@ryansolid
Copy link
Member

@lxsmnsyc can you comment on this?

@Alloyed
Copy link

Alloyed commented Apr 9, 2024

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!

@ryansolid
Copy link
Member

Ok then lets move this to refresh.

@ryansolid ryansolid transferred this issue from solidjs/solid Apr 22, 2024
wjq990112 pushed a commit to wjq990112/solid-refresh that referenced this issue Jul 19, 2024
wjq990112 added a commit to wjq990112/solid-refresh that referenced this issue Jul 19, 2024
lxsmnsyc added a commit that referenced this issue Aug 1, 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 a pull request may close this issue.

4 participants