tc39/proposal-asset-references

What about dynamic specifiers?

ljharb opened this issue · 3 comments

If i wanted to dynamically (ie, not a static specifier) get an asset reference to something I'd otherwise use import() with, how do i do that?

I just found https://github.com/sebmarkbage/ecmascript-asset-references#dynamic-asset-resolution - it seems like the static and dynamic forms should mirror each other, just like import vs import()?

Yea. Except it won’t work without a keyword. So maybe import asset x from “x” and import.asset(“x”)?

Sure - or import.asset x from 'x' and import.asset('x'), and then it's even closer?