-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Experimental prerenderer #1501
Conversation
… mode-prerener
|
@@ -0,0 +1,25 @@ | |||
const { cpus } = require('os'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put copyright here
CLI_DATA: { url, ...routeData }, | ||
webpack, | ||
}; | ||
const htmlWebpackPlugin = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explain this
@prateekbh can we also upgrade to html-webpack-plugin 4? https://dev.to/jantimon/html-webpack-plugin-4-has-been-released-125d who can help review this change? would really like to try it out, our build with 100 pages takes a long time currently |
@prateekbh why was this closed? What is the solution for builds that take a very long time? |
@psabharwal123 Your best bet would be to move over to WMR likely. We don't have infinite resources to develop everything in parallel, and WMR has a lot more momentum as well as advantages. |
Is there a guide to migrating from preact cli to WMR? Where can I see the advantages of it over preact-cli so I can convince our team to look into this? |
There is no guide at the moment, nor is there a list of advantages. WMR wasn't necessarily meant to be a successor to Preact-CLI, though that's now where more effort is being spent these days. Because of that no one's really taken time to try to sell WMR as an upgraded CLI, though maybe that's something that should be done. I'll see how people feel about that. The upgrade might be quite a bit of work, as WMR is not Webpack-based, but Rollup-based. Any plugins you've added in your |
Unfortunately the experimental renderer never did make it in, but if someone still needs a fast prerender.js script: |
Thanks! I ll look into it |
Fixes #1482
What kind of change does this PR introduce?
Feature request.
Did you add tests for your changes?
Yes
Summary
Implements an experimental pre-renderer with a set of API for the data.
Does this PR introduce a breaking change?
No
Other information
There is some effort to keep the current templates non-breaking but the API will eventually need to be updated and can onlhy land as stable in v4.0
API
The
template.html
will have access to the following API