Comments (12)
I'm also interested in having an integration with SolidJs
I don't have much experience with SolidJs, but did a PR in my personal fork if you want to take a look with a basic implementation
https://github.com/yonathan06/fastify-vite/pull/1/files
this will take some time as I'm new to it (both SolidJs and Vite), so feel free to throw your thoughts
from fastify-vite.
We have a Solid example for fastify-vite now and full blown support in Fastify DX!
from fastify-vite.
I am interested in using this with a SvelteKit application; could we maybe work together on a PR to make it more framework agnostic? I am also not super familiar with this library though so it would take some time for me to read up but think I can help if we are working toward a more framework agnostic library; let me know if that's of interest.
from fastify-vite.
I'm not sure how will that play well, specially since both Svelte and SolidJS uses specialized compilers for their own.
from fastify-vite.
I'm interested in seeing how well the Renderer API will accommodate for this.
It may need further refinements, but I'd say it's close?
from fastify-vite.
The Renderer API seems to be sufficient enough based on what I've seen on React. On the other hand, there are some other features that SolidJS handles out-of-the-box (e.g. isServer, hydration scripts, etc.). I'll probably write a POC tomorrow and see if there's any issues.
from fastify-vite.
Another thing that needs to be done ASAP is writing a compiler for the production html.js — right now it's a just a chained series of .replace()
calls but it needs to be a precompiled template — maybe using string-template?
from fastify-vite.
https://github.com/terixjs/fastify-vite/blob/main/packages/fastify-vite-react/html.js#L20-L31
I just checked it again. Is this markup placeholder being injected by fastify-vite
?
Also just to add: https://www.solidjs.com/guide#hydration-script
SolidJS has its own hydration capabilities already managed and rendered into the SSR. I'm not sure how this would work with fastify-vite
given that it has its own mechanism.
from fastify-vite.
I just checked it again. Is this markup placeholder being injected by fastify-vite?
Yep — that's the thing I want to start precompiling.
SolidJS has its own hydration capabilities already managed and rendered into the SSR. I'm not sure how this would work with fastify-vite given that it has its own mechanism.
I'm open to changes in the renderer API to accommodate for this.
from fastify-vite.
TBF, I feel like it can be mixed with Solid's generateHydrationScript
if I have to assume that the hydration
part is only for the hooks fastify-vite
supplies.
Again, I'll have to write a PoC to see if there's any design issues, in which case I can probably suggest some.
from fastify-vite.
@yonathan06 Amazing, can I ask you to go ahead and put this is up as a PR to our dev
branch? I can probably chime in to fill the gaps on the fastify-vite architectural site.
from fastify-vite.
@galvez sure, I think I need access to push the feature branch
from fastify-vite.
Related Issues (20)
- Files in /public folder are not served in production mode HOT 4
- Error on Windows: TypeError: Cannot read properties of null (reading 'replace')
- Websocket can not connect when using https fastify
- If vites config contains `defineConfig` with callback, then SSR is broken HOT 3
- How to configure multi-page entry
- Issues running with fastify-compress HOT 4
- Serve static assets from ssr builds in production mode HOT 2
- TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string
- Trace: The CJS build of Vite's Node API is deprecated
- Conflicting websockets between vite and `@fastify/websocket` causing infinite redirects HOT 1
- [react][windows] React Starter Template does not start on Windows HOT 4
- How to use Vue plugins like instance.use(...) HOT 4
- NPM install fails with 'edgesout' error HOT 3
- [SPA] allowing passing additional context to the render function HOT 3
- mts file extension is not supported for vite.config HOT 3
- @fastify/vue Smart Import doesn't resolve path in windows HOT 5
- SPA mode results in `Cannot read properties of null`
- SPA Documentation / Examples HOT 5
- Move `fastify` and `vite` to peer dependencies
- Missing `fastify-plugin` dependency
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastify-vite.