mdynnl
mdynnl
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
i think you probably need to use bun bundler api add add that plugin with generate: ssr
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
great if it does
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
i'm not sure if bun already reads from tsconfig's paths though
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
important bit for typescript to know about solid
"jsx": "preserve",
"jsxImportSource": "solid-js",
"jsx": "preserve",
"jsxImportSource": "solid-js",
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
OP already seems to have tsconfig configured correctly so not posting that
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
last time i checked it didn't support plugins during runtime
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
you need to configure preload in bunfig.toml
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
alternatively with that plugin
// ./src/solidPlugin.ts
import { plugin } from "bun";

// @ts-ignore
import { SolidPlugin } from "bun-plugin-solid";
await plugin(SolidPlugin({ generate: "ssr" }));
// ./src/solidPlugin.ts
import { plugin } from "bun";

// @ts-ignore
import { SolidPlugin } from "bun-plugin-solid";
await plugin(SolidPlugin({ generate: "ssr" }));
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
here you go https://bun.sh/docs/runtime/plugins
bun a @babel/core babel-preset-solid solid-js
bun a -d @types/babel__core # optional
bun a @babel/core babel-preset-solid solid-js
bun a -d @types/babel__core # optional
// bunfig.toml
preload = ["./src/solidPlugin.ts"] #
// bunfig.toml
preload = ["./src/solidPlugin.ts"] #
// ./src/solidPlugin.ts
import { plugin } from "bun";

await plugin({
name: "solid plugin",
async setup(build) {
// @ts-ignore if you've skipped @types/babel__core
const babel = await import("@babel/core");

build.onLoad({ filter: /\.[tj]sx$/ }, async (args) => {
const result = await babel.transformFileAsync(args.path, {
presets: ["@babel/preset-typescript", ["solid", { generate: "ssr" }]],
});


if (result?.code) {
console.log(result.code);
return {
loader: "js",
contents: result.code,
};
}
});
},
});
// ./src/solidPlugin.ts
import { plugin } from "bun";

await plugin({
name: "solid plugin",
async setup(build) {
// @ts-ignore if you've skipped @types/babel__core
const babel = await import("@babel/core");

build.onLoad({ filter: /\.[tj]sx$/ }, async (args) => {
const result = await babel.transformFileAsync(args.path, {
presets: ["@babel/preset-typescript", ["solid", { generate: "ssr" }]],
});


if (result?.code) {
console.log(result.code);
return {
loader: "js",
contents: result.code,
};
}
});
},
});
47 replies
SSolidJS
Created by webstrand on 4/21/2025 in #support
Stale read in <List><Show><List>
here, the node that triggers the error eventually gets cleaned up as a result of its reparent recomputing
17 replies
SSolidJS
Created by webstrand on 4/21/2025 in #support
Stale read in <List><Show><List>
i know that it was done to detect cases like this but it isn't that obvious that this might happen in real world scenarios
17 replies
SSolidJS
Created by webstrand on 4/21/2025 in #support
Stale read in <List><Show><List>
essentially what List or indexArray helper is doing under the hood
17 replies
SSolidJS
Created by webstrand on 4/21/2025 in #support
Stale read in <List><Show><List>
17 replies
SSolidJS
Created by webstrand on 4/21/2025 in #support
Stale read in <List><Show><List>
it basically boils down to recomputation of a child node that access the condition as a result of write operation that negates the condition
17 replies
SSolidJS
Created by webstrand on 4/21/2025 in #support
Stale read in <List><Show><List>
17 replies
SSolidJS
Created by hyperknot on 4/5/2025 in #support
Can I use Solid for rendering DOM elements under non-Solid parts of the website?
from the surface, it looks as if it'd modify the node in its own way
9 replies
SSolidJS
Created by hyperknot on 4/5/2025 in #support
Can I use Solid for rendering DOM elements under non-Solid parts of the website?
what does that update do exactly?
9 replies
SSolidJS
Created by hyperknot on 4/5/2025 in #support
Can I use Solid for rendering DOM elements under non-Solid parts of the website?
to explain in this particular case, if ProseMirror doesn't interact with the node or its content in any way, it should be fine but you need to handle the disposal when ProseMirror removes the node
9 replies
SSolidJS
Created by hyperknot on 4/5/2025 in #support
Can I use Solid for rendering DOM elements under non-Solid parts of the website?
also if you're using render, it's the responsibility of the caller to hook up the disposal
9 replies
SSolidJS
Created by hyperknot on 4/5/2025 in #support
Can I use Solid for rendering DOM elements under non-Solid parts of the website?
you can render to any target anywhere in the DOM but solid has to be the sole manager of that node, it's unaware of anything that happens outside of the system
9 replies