feat: template-only components! #5669
Draft
+80
−54
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.
Details
With this change, having a
.jsor.tsfile is no longer required for components. If a component only needs a template, then it can specify just an.htmlfile with no extra boilerplate.This is accomplished in the rollup plugin by detecting if a component's entrypoint is an
.htmlfile. If it is, then it injects a virtual JS file with the minimal boilerplate, which in turn implicitly imports the (real) HTML template.WIP testing: the playground no longer has
app.js, but it still works!Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?
GUS work item