-
Notifications
You must be signed in to change notification settings - Fork 8
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
Integration with import-maps proposal #9
Comments
@just-boris what exactly are you expecting to align? https://github.com/sebmarkbage/ecmascript-asset-references#string-instead-of-assetreference-object has some notes on why a string isn't ideal for resources in this proposal. |
I opened this issue to make proposal authors aware about each other's work. See the code examples above. There are two ways of doing the same thing, potentially. But if these two proposals would be developed in isolation, it might result in different behavior in terms how path resolution if woking. For example, would this proposal respect import-maps declaration in browser environment? What would happen if I will define |
Although relative |
@just-boris this proposal is not mandating any resolution behavior on hosts. A host could intercept the specifier and do anything it wants with it. @domenic I think both those types have their own problems:
For both of these types, I'm unclear on how they apply to the use case of lazily allowing |
It is; you use clone(), or you just use GET requests which don't need cloning.
This is not correct.
That's true; if those environments want to be compatible with browsers they might need to figure something out. Alternately those environments could just run the compatible subset of code produced by people which treat the requests as opaque.
That is also true of opaque tokens. In the opaque token case, it's not only not synchronously available, it's just never available, period!
That's a pretty solid argument for
I have a hard time understanding this paragraph, but from what I can tell it will always be redundant to do |
I'm not sure how to respond to that, you even mention needing to use .clone else being stuck with GET methods. It also is mutable, so passing it around has similar problems to passing URL objects around.
Unless this is going through WHATWG instead of ECMA I would assume it to be host agnostic. It could be left to host defined types though as well.
Opaque tokens are synchronously available as a reference identity. I don't understand the statement that it is not available? Do you mean it doesn't expose reflection? I could imagine it exposing reflection APIs if there are needs for them.
For relative locations this is more apparent: import(resolve('./en.json', foo)) We want to be sure we never have to use |
Hello!
I am very happy to see, that the issues that developers find missing in the platform are being addressed.
But the proposed solution here is overlapping with another proposal: https://github.com/domenic/import-maps
import-maps introduce a new protocol
import:
that you can use to load any resources following the same path resolution algorithm, as you already have for JS modules. For example the image loading example from the readme of this proposal can be updated usingimport:
protocol:before
after
It would be nice, if these two proposals will be aligned with each other.
/cc @domenic
The text was updated successfully, but these errors were encountered: