wmr
wmr copied to clipboard
Experimental SSR plugin
This adds support for wmr.config.js, and uses it in the demo app to demonstrate an SSR middleware.
ToDo:
- [x] have the SSR plugin use the same
prerender()export we support for prod prerendering - [x] filter out verbose node module loader logs
- [ ] production SSR (maybe this is too different of a case?)
Possibly - they have to be published independently of the main package, but that doesn't seem like a huge issue. In the case of this SSR thing I'm not sure if it's ready to be a proper plugin, was more of a way to keep the experiment working without landing it in core.
Size Change: -41 B (0%)
Total Size: 693 kB
| Filename | Size | Change | |
|---|---|---|---|
demo/dist/about/index.html |
635 B | -1 B | |
demo/dist/chunks/compat.********.js |
14.9 kB | +1 B | |
demo/dist/chunks/index.********.js |
210 B | -106 B (50%) | đ |
demo/dist/compat/index.html |
1.53 kB | -1 B | |
demo/dist/env/index.html |
691 B | -1 B | |
demo/dist/index.html |
681 B | -1 B | |
wmr.cjs |
662 kB | +68 B (0%) |
âšī¸ View Unchanged
| Filename | Size | Change | |
|---|---|---|---|
demo/dist/assets/Calendar.********.css |
702 B | 0 B | |
demo/dist/assets/style.********.css |
386 B | 0 B | |
demo/dist/chunks/class-fields.********.js |
207 B | 0 B | |
demo/dist/chunks/prerender.********.js |
2.45 kB | 0 B | |
demo/dist/class-fields/index.html |
612 B | 0 B | |
demo/dist/error/index.html |
622 B | 0 B | |
demo/dist/files/index.html |
654 B | 0 B | |
demo/dist/index.********.js |
6.89 kB | 0 B |
Should we revive this into a custom plugin? Do we expect a production server running, if so will we have output targets that make it easy to publish i.e. person wants a serverless way to serve it or a normal deploy on a server?
I have an idea for project where I'd need to SSR some pages on demand, and currently I'm on the fence if I should go with preact/wmr for it... I'd really love to, but I wish there was a decent way to do it without doing crazy hacks. Don't wanna go with Rails :)
Not sure if it's useful but here's a +1 for this feature