Skip to content
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

HTML modules #285

Closed
o-t-w opened this issue Nov 23, 2023 · 5 comments
Closed

HTML modules #285

o-t-w opened this issue Nov 23, 2023 · 5 comments
Labels
invalid Not an actionable request

Comments

@o-t-w
Copy link

o-t-w commented Nov 23, 2023

WebKittens

No response

Title of the spec

HTML Modules

URL to the spec

https://github.com/WICG/webcomponents/blob/gh-pages/proposals/html-modules-explainer.md

URL to the spec's repository

No response

Issue Tracker URL

No response

Explainer URL

No response

TAG Design Review URL

w3ctag/design-reviews#334

Mozilla standards-positions issue URL

mozilla/standards-positions#137

WebKit Bugzilla URL

No response

Radar URL

No response

Description

Following the standardisation of JSON modules and CSS modules, HTML modules make use of the import attributes syntax to import HTML.

import {content} from "foo.html" with { type: "html" };
@annevk
Copy link
Contributor

annevk commented Nov 24, 2023

Is this proposal being actively developed somewhere? It hasn't been discussed in the Web Components community for many years now.

@o-t-w
Copy link
Author

o-t-w commented Nov 24, 2023

It initially stalled because of all the churn with import assertions/import attributes and because it was decided to progress CSS modules and JSON modules first. Sadly the Edge team (who originally worked on it) have not had the bandwidth to progress the specification, but the Web Components Community Group are still keen to see it progress. The initial issue thread is still pretty active. Developer sentiment is still positive 1, 2, 3

@jaredcwhite
Copy link

I can concur, still lots of chatter out there in web component circles. I will hear questions to the effect of "why can't we just write an HTML template and import that as a web component?" To which I always reply, well hopefully we will get there with HTML modules!

In fact, I wrote a bundler-level solution for it as this esbuild plugin, which is now being used in production:
https://github.com/whitefusionhq/esbuild-plugin-html-modules

@justinfagnani
Copy link

@annevk true, it hasn't been discussed directly for a while, and I believe that @dandclark may be working on other things than web specs, but with import attributes landing and talks about declarative custom elements - which would need a HTML module format to be very useful - I think things could be picked up. Not sure what that means for a standard position issue though.

I'm personally working on a new Rollup plugin / polyfill to allow us to try out various semantics.

@annevk annevk added the invalid Not an actionable request label Jan 11, 2024
@annevk
Copy link
Contributor

annevk commented Jan 11, 2024

Appreciate the update. I will close this for now. Once there's a proposal with concrete implementer requirements that can be evaluated we'll be happy to go over it. The WebKit team definitely considers this an area worthy of exploration.

@annevk annevk closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Not an actionable request
Projects
None yet
Development

No branches or pull requests

4 participants