Accept header
Just to bring up the question - is it worth altering the accept header for ES6 module file requests?
We have been looking for a fallback mechanism, maybe extending the accept header, or any other request header is the solution. By doing that, we should be able to do something like this:
<script src="path/to/foo.js" type="module"></script>
...where the fallback mechanism can be implemented on the edge layer by analyzing the headers, and providing the right format.
updated
@caridy what does that have to do with the question of accept headers, can you explain?
@matthewp imagine a service that analyzes the header, and infers whether or not the browser supports modules, and based on that it responses with a module or a transpiled version of it. This is not as crazy as it sounds :)
What would be different about the headers? Isn't that @guybedford's question, if the Accept header should be different for modules?
Ah, @matthewp, I finally see what you mean, let me rephrase it in my first comment...