Skip to content

How to use with Solid.js? #414

Answered by Jarred-Sumner
thislooksfun asked this question in Q&A
Discussion options

You must be logged in to vote

Bun has a builtin SolidJS transform (per tweet from a few months ago)

It's honestly like 25% implemented. More work needs to be done on it before it'll be good.

You can try it with bun dev, but make sure to run bun bun ./entry-point.js

To configure Bun to use the SolidJS transform, jsxImportSource should start with solid-js:

bun/src/options.zig

Lines 910 to 914 in a1a0c18

if (jsx.import_source.len > "solid-js".len and strings.eqlComptime(jsx.import_source[0.."solid-js".len], "solid-js")) {
pragma.runtime = .solid;
pragma.supports_fast_refresh = false;
}
pragma.package_name = parsePackageName(pragma.import_source);

This can be configured several differ…

Replies: 8 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@tonyrewin
Comment options

@N0tExisting
Comment options

Comment options

You must be logged in to vote
2 replies
@N0tExisting
Comment options

@tonyrewin
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Jarred-Sumner
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@janos-r
Comment options

Comment options

You must be logged in to vote
2 replies
@russelgal
Comment options

@DaniGuardiola
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet