Re: [w3c/webcomponents] HTML, CSS, and JSON modules shouldn't solely rely on MIME type to change parsing behavior (#839)

@justinfagnani 
> which allows userland building of arbitrary objects, and could be applied to any kind of file.

When I see that I'm immediately thinking of things like
```js
import myImgUrl from './my-img' as 'url';
// <img  src={myImgUrl} />
import SomeIcon from './some-icon.svg' as 'react-component';
// <SomeIcon />
import postsQuery from './get-posts.graphql' as 'graphql';
// await graphql.query(postsQuery)
import iconStyles from './some-icon.png' as 'sprite'
// <div styles={iconStyles} />

as 'text'
as 'binary'
as 'json'
...
```
where these types would be host/bundler defined. Is this the kind of stuff you have in mind?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/839#issuecomment-549149353

Received on Sunday, 3 November 2019 15:41:17 UTC