Skip to content

Comments

Allow host module resolution to be overridden#153

Open
akrantz01 wants to merge 2 commits intobearcove:mainfrom
akrantz01:resolve-host
Open

Allow host module resolution to be overridden#153
akrantz01 wants to merge 2 commits intobearcove:mainfrom
akrantz01:resolve-host

Conversation

@akrantz01
Copy link

Related to #143

Adds the equivalent of the resolveJs and resolveWasm for the host interface so that arborium can be used fully without a CDN. Also exports the arborium_host.js and arborium_host_bg.wasm files in the package.json so that dynamic imports work with Node.

I opted to duplicate resolveJs and resolveWasm as resolveHostJs and resolveHostWasm respectively. I considered repurposing the language attribute and denoting "host" as a special value. However, I figured this would be the clearest and allow any existing users of resolveJs and resolveWasm to keep their implementations unchanged and without any special cases.

I believe this should completely resolve #143 since now every part of the dynamic loading is now customizable at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm @arborium/arborium crate: usage without CDN

1 participant