Détail du package

@brad-jones/jsr-dynamic-imports

brad-jones377MIT0.1.2

A workaroud for JSR's inability to use dynamic imports, see: https://github.com/denoland/deno/discussions/26266

readme

jsr-dynamic-imports

This project provides a workaround for the inability to use dynamic imports in JSR packages.

see: https://github.com/denoland/deno/discussions/26266

How does it work?

It is made up of 2 packages.

This seems to circumvent Deno's custom import behavior that is applied to any HTTP import, be it from https://jsr.io or otherwise.

How do I use it?

deno add jsr:@brad-jones/jsr-dynamic-imports
import { importModule } from "@brad-jones/jsr-dynamic-imports";

const myModule = await importModule(dynamicVariable);

NB: Alternatively one could import the NPM package directly. eg: npm:@brad-jones/jsr-dynamic-imports\ We just provide the JSR package as a convenience for the Deno / JSR community