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

HiddenSelectBase leads to import "use" from "solid-js/web" in compiled SolidStart output #542

Open
JohnCido opened this issue Jan 7, 2025 · 0 comments

Comments

@JohnCido
Copy link

JohnCido commented Jan 7, 2025

Describe the bug

I'm currently using SolidUI to add component to my project, since it's a shadcn/ui inspired library and I've located the use function was used by compiled HiddenSelectBase from Kobalte so I do not believe it's an issue of SolidUI.

Inside the compiled output, it has this last line:

import { isServer, createComponent, Dynamic, mergeProps as mergeProps$1, memo, use, spread, insert, effect, style, setAttribute, template, Portal, ssr, ssrHydrationKey } from "solid-js/web";

...

function HiddenSelectBase(props) {
  ...
  return (() =>
    ...
    const _ref$ = mergeRefs((el) => ref = el, local.ref);
    typeof _ref$ === "function" && use(_ref$, _el$4);
...

Which uses a use function imported from solid-js/web, I think the related ref is defined here.

The problem here is that this use function is not exported from solid-js/web at all (SolidJS version 1.9.3) and I'm so confused why it's introduced here in the compiled codes.

To Reproduce
Codesanbox URL

Steps to reproduce the behavior:

  1. Add Select or Combobox component using SolidUI
  2. Render it in any route
  3. Set the server preset to be cloudflare-pages inside app.config.ts
  4. Run build script

Expected behavior
Build output without error.

Screenshots
If applicable, add screenshots to help explain your problem.

截屏2025-01-07 12 57 25

Additional context
Please help confirm if this is a Kobalte issue or vinxi issue, since this does not break build process of node-server preset but still adds this use import.

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

No branches or pull requests

1 participant