mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[GH-ISSUE #796] Bun preload plugin fails on Windows due to forward-slash-only regex and missing solid-js/web rule #987
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#987
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @counter2015 on GitHub (Mar 9, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/796
Description
The Bun preload plugin in
@opentui/solid/scripts/solid-plugin.tsfails silently on Windows, causing solid-js to load itsserver-side rendering (SSR) modules instead of the client-side ones. This results in runtime errors when rendering.
I try to run this locally, and find some problem, Claude Code help me to fix it by change local code, but I'm not familiar with ts and this project, need some help from mantainers to check whether this fix is right or not.
Here is the changed code and analysis from Claude Code.
Root Cause
Two issues in
solid-plugin.ts:1. Regex filters only match forward slashes
The
onLoadfilters use forward slashes to match paths:On Windows, Bun resolves module paths with backslashes (e.g. D:\project\node_modules\solid-js\dist\server.js), so these regex patterns
never match and the redirect silently fails.
2. Missing rule for solid-js/web/dist/server.js
The plugin redirects solid-js/dist/server.js → solid.js and solid-js/store/dist/server.js → store.js, but there is no rule for
solid-js/web/dist/server.js → web.js.
Since solid-js/web/package.json maps the "node" export condition to dist/server.js, Bun (which matches "node" by default) loads the
SSR version of solid-js/web, leading to errors like:
at render (node_modules/@opentui/solid/index.js:357:17)
Suggested Fix
Use [/\] in regex filters to match both path separators, and add the missing solid-js/web rule:
Environment