Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const dependency = new Compartment({}, {}, {
resolveHook: (moduleSpecifier, moduleReferrer) =>
resolve(moduleSpecifier, moduleReferrer),
importHook: async moduleSpecifier => {
const moduleLocation = locate(moduleSpecifier);
const moduleText = await retrieve(moduleLocation);
return new ModuleStaticRecord(moduleText, moduleLocation);
const application = new Compartment({}, {
'dependency': dependency.module('./main.js'),
}, {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.