oke
Explore posts from serversDTDrizzle Team
•Created by fossfighter on 2/28/2025 in #help
Turso drizzle-kit CLI: Passing dbCredentials via CLI options
If it's an environment variable, maybe you can just pass in directly into the command ?
Or create a
.env
file and use source
to source the envs2 replies
DTDrizzle Team
•Created by claudiu on 2/28/2025 in #help
Migration failed, and can't add new migration
Since the migration failed, I think you should run
drizzle-kit drop
and drop the last two migrations concerning this label
column, then re-generate migration again3 replies
DTDrizzle Team
•Created by tltl on 2/18/2025 in #help
How to fix TypeError: Cannot read properties of undefined (reading 'columns')?
Do you have reproduction steps? Could you isolate which line of code caused this issue? Maybe provide a minimal reproduction repository ?
2 replies
CDCloudflare Developers
•Created by oke on 2/18/2025 in #pages-help
Cannot see "Build Configuration" option for Pages project on dashboard
Therefore, no Github connection was made. The project counts as a "file upload deploy" and thus the build options were irrelevant.
3 replies
CDCloudflare Developers
•Created by oke on 2/18/2025 in #pages-help
Cannot see "Build Configuration" option for Pages project on dashboard
Okay I found out why. This is because I "mistakenly" deployed this project using the
wranger pages deploy
CLI command3 replies
SSG isn't truly static
You'd somehow need to get Vite to transform the email code at build time, and then run it at build time, so you could put the result in a virtual moduleI might need to actually need to whip up a manual esbuild pipeline to do this. If only I could re-use the esbuild pipeline that Vite/Vinxi/SolidStart is already using. We'll see if this is enough; seems like SolidStart also employs Babel for its processing
20 replies
SSG isn't truly static
the renderToString call on the server during prerendering and on the client after a navigationYeah that's the current implementation, using a server function. Only issue is every time someone visits the page, the processing (importing component and calling
renderToString
) is called again --> problem is potentially further exacerbated by serverless cold start20 replies
SSG isn't truly static
That's okay. The components Button, Container, Row, Column have been developed to be email-friendly. They are not simple <button> or <div> but a bunch of <table> and <td> under the hood
Only thing I want is to be to build those emails once to produce the HTML of each email
I could make an API route
GET /build_emails
--> that calls the renderToString
functions on all the JSX Email Templates, and produce a static JSON file that SolidStart can import. --> Then make a Vite plugin so that every time the email_templates
folder changes, the plugin re-fetch this API route
But that feels like a hack. Also wouldn't work at build time (since at build time there is no server running to serve the GET /build_emails
URL). If somehow I could use renderToString
and make Vite understands SolidJS JSX in a build process20 replies
SSG isn't truly static
In a way I suppose, but I don't think it's an npm package. It's definitely not intended to be customizable after build time.
The user story is:
A developer uses components like Button, Container, Row, Column to build out Solid-JSX-based email templates
--> Then they use SolidStart to build out an Admin Dashboard that have route
/email_content/[template_name]
that displays the HTML result of these templates so that Marketing can copy the HTML and send them to people
I hope I make sense20 replies
SSG isn't truly static
so that developers build emails using JSX components inside an
email_templates
folder, then all the HTML are rendered out one-time during build, and then embed that HTML onto the /email_content
url and users of the app can just copy the generated HTML via the web interface.20 replies
SSG isn't truly static
Thanks for the info. That's good to know.
I have tried to develop a Vite plugin to do my processing, but I want to call
renderToString
on imported SolidJS components (I'm developing an Solidjs email template solution), and I can't seem to do that with a Vite plugin via buildStart
hook.
I deduced that my Vite plugin runs before the SolidJS plugin/compiler/JSX runtime kicks in. import.meta.glob
doesn't work in Vite plugin; and if I use dynamic await import
, when I import the TSX file in my Vite plugin, it calls to React.createElement
???20 replies