Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
It extracts
render-html-plugin
into a separate package.Did you add tests for your changes?
These changes do not include any change in the logic of the application. This PR limits itself to move existing files into separate packages. I have tested the changes by creating and building an app using this version.
The only change in codebase is the currying of the plugin with a config object and the introduction of a
find
logic for the template file.If this PR looks ok to reviewers, I'm happy to add more tests.
Summary
The main goal for doing this is to allow more customisation of the prerender process as per #844
For final users, this PR does not change much as it doesn't expose an easy way to configure the plugin. I think this would be better addressed in a future PR, since this one already introduces some changes that I would like to have reviewed first:
util/webpack
) into a separate package. This would require publishing this package.util
file which now becomes a shared dependency between the maincli
package and@preact/render-html-plugin
. For this reason, I have also created a@preact/cli-util
package so that both can share the code. This would also require publishing the packageDoes this PR introduce a breaking change?
No
Other information
Please paste the results of
preact info
here.