Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Experimental SSR plugin #169

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Experimental SSR plugin #169

wants to merge 11 commits into from

Conversation

developit
Copy link
Member

@developit developit commented Oct 25, 2020

This adds support for wmr.config.js, and uses it in the demo app to demonstrate an SSR middleware.

ToDo:

  • have the SSR plugin use the same prerender() export we support for prod prerendering
  • filter out verbose node module loader logs
  • production SSR (maybe this is too different of a case?)

@developit developit added the DRAFT Draft, not ready for merging label Oct 25, 2020
Copy link
Member

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Should we convert this into a monorepo'ish structure to have some plugins that we offer (also as an inspiration to people who want to implement their own)?

@developit
Copy link
Member Author

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.

This was referenced Oct 28, 2020
@developit developit changed the title [draft] wmr.config.js, plugins, and an SSR plugin Experimental SSR plugin Nov 18, 2020
@github-actions
Copy link
Contributor

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

compressed-size-action

Base automatically changed from master to main January 22, 2021 18:07
@JoviDeCroock
Copy link
Member

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?

@Inviz
Copy link
Contributor

Inviz commented Jun 7, 2021

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
DRAFT Draft, not ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants