MaveriX89
MaveriX89
Explore posts from servers
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
You guys are incredible! I was able to get past this blocker! This is all in development mode at least -- now going to try doing a production build to see if it all still works
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Btw, if using the preload script that you shared above, will that run automatically when running bun or bun build ? So I use bun to run my server in development but then I compile it with bun build for production
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Yeah, I believe Bun should automatically infer things from tsconfig according to their docs
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Omg, you guys are all incredible! Thank you so much for sharing all of this info!! Just for reference, here's what my tsconfig lookis like:
{
"compilerOptions": {
/* Base Options: */
"baseUrl": ".",
"outDir": "dist",
"esModuleInterop": true,
"skipLibCheck": true,
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"allowJs": true,
"resolveJsonModule": true,
"moduleResolution": "Bundler",
"moduleDetection": "force",
"isolatedModules": true,
"verbatimModuleSyntax": true,

/* Strictness */
"strict": true,
"allowUnreachableCode": false,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,

/* JSX */
"jsx": "preserve",
"jsxImportSource": "solid-js",

/* Types */
"types": ["vite/client", "bun-types", "@testing-library/jest-dom"],
"paths": {
"@/web/*": ["./src/*"],
"@/shared/*": ["./shared/*"],
"@/server/*": ["./server/*"]
}
},
"exclude": ["node_modules", "coverage", "dist", "public"]
}
{
"compilerOptions": {
/* Base Options: */
"baseUrl": ".",
"outDir": "dist",
"esModuleInterop": true,
"skipLibCheck": true,
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"allowJs": true,
"resolveJsonModule": true,
"moduleResolution": "Bundler",
"moduleDetection": "force",
"isolatedModules": true,
"verbatimModuleSyntax": true,

/* Strictness */
"strict": true,
"allowUnreachableCode": false,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,

/* JSX */
"jsx": "preserve",
"jsxImportSource": "solid-js",

/* Types */
"types": ["vite/client", "bun-types", "@testing-library/jest-dom"],
"paths": {
"@/web/*": ["./src/*"],
"@/shared/*": ["./shared/*"],
"@/server/*": ["./server/*"]
}
},
"exclude": ["node_modules", "coverage", "dist", "public"]
}
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
I was suspecting I probably have to make use of a Bun plugin that allows me to use the custom Babel transform that the Solid component I’m using in my Elysia server needs
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Funny enough, I decided to make a post in the Bun discord about this to see what people had to say and someone already posted some not so nice words about Solid https://discord.com/channels/876711213126520882/1365321218898526250
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Precisely. I have a full stack app repo consisting of a Solid SPA using the Solid Vite plugin and an Elysia BFF server. Everything spoken about here is happening within the BFF layer which is not using the Vite plugin because I run the Elysia server using Bun (not Vite)
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
I’ll be in front of a computer soon to try things out
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
So now the question becomes how to add the babel transform into Bun’s toolchain. I haven’t done that myself yet.
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Ah interesting. I thought they had some basic support since in the bunfig.toml I can set both jsx: preserve and jsxImportSource: “solid”
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Do I really need Babel though? Bun can natively process JS/TS and JSX/TSX out of the box. Unless there’s a dot that I’m missing in the whole mental model
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Yeah, Bun should be picking up what I have configured in my tsconfig for sure according to their docs. I also added a JSX pragma in the TSX module for good measure and set it to solid-js
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
There’s a part of me that also has suspicions around how the file extensions are playing with each other (e.g. my importing of a TSX file within a normal TS file). Everything in my Elysia layer is TS except for that one component module.
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
I’ll give it a shot when I get back in front of my computer
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
I assume there is. I’d be surprised if Bun doesn’t have that implemented yet. I’m using Bun for everything except for building/bundling the Frontend.
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
That’s a good question about whether something within Elysia brings React in somehow.. I even have my bunfig.toml JSX config set to Solid just for good measure and still the same outcome.
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Nah, this whole problem started when I added a Solid component to my Elysia server layer because I’m in the process of adding email verification for Auth. My server is doing the work and I want to express the email’s HTML markup as a Solid component and then stringify the whole thing
47 replies
SSolidJS
Created by Benno on 9/17/2024 in #support
SolidJS renderToString with Hono: Undefined or 'React not defined' error
I have this same exact problem except I’m using Elysia in my case. Were you able to resolve this?
2 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
@foolswisdom yeah, it’s interesting. I’m using Vite to build my Solid SPA and using bun to build/run my server. Bun is configured to read my tsconfig.json and everything is set to point to Solid from a JSX standpoint.
47 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
@Madaxen86 yeah, I had all that already set in my typescript config since cI have a Solid SPA. All of the things I’m attempting is happening in my backend-for-frontend layer using Elysia.
47 replies