I've been following import maps with much interest. I'm coming from the plv8 perspective, thinking about how to make them work in that environment. It's a special environment, since plv8 does not have access to either the filesystem or HTTP requests, since it is a trusted language. And landed upon this perspective:
Wouldn't it be more flexible and less opinionated, if import maps used lambdas instead of URL remapping and/or string rewriting? I would like import maps to be a "resolver lambda" that accepted a "import from x" string, and was responsible for turning x into a block of source code. This way the developer could control how dependencies were resolved, and have total control over the resolution mechanism.
I've been following import maps with much interest. I'm coming from the plv8 perspective, thinking about how to make them work in that environment. It's a special environment, since plv8 does not have access to either the filesystem or HTTP requests, since it is a trusted language. And landed upon this perspective:
Wouldn't it be more flexible and less opinionated, if import maps used lambdas instead of URL remapping and/or string rewriting? I would like import maps to be a "resolver lambda" that accepted a "import from x" string, and was responsible for turning x into a block of source code. This way the developer could control how dependencies were resolved, and have total control over the resolution mechanism.