Skip to content

Conversation

@wjhsf
Copy link
Contributor

@wjhsf wjhsf commented Jan 8, 2026

Details

With this change, having a .js or .ts file is no longer required for components. If a component only needs a template, then it can specify just an .html file with no extra boilerplate.

This is accomplished in the rollup plugin by detecting if a component's entrypoint is an .html file. 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?

  • 😮‍💨 No, it does not introduce a breaking change.
  • 💔 Yes, it does introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.
  • 🔬 Yes, it does include an observable change.

GUS work item

Copy link

@lpomerleau lpomerleau left a comment

Choose a reason for hiding this comment

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

👍

scoped,
specifier: params.get('specifier'),
scoped: params.has('scoped'),
templateOnlyEntry: params.get('template'),

Choose a reason for hiding this comment

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

Is this null if there is a js or ts file for the component?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, it's only set for template-only HTML files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants