Skip to content

Instantly share code, notes, and snippets.

@jkrems
Created August 5, 2019 19:08
Show Gist options
  • Save jkrems/02c0abc982c5364f7b270b0ccb6e4743 to your computer and use it in GitHub Desktop.
Save jkrems/02c0abc982c5364f7b270b0ccb6e4743 to your computer and use it in GitHub Desktop.
client.mjs:
import "fs";
[A]:
parentResolve()
[B]:
parentResolve()
[native]:
'fs' -> 'node:fs'
'fs' -> $BWRAP = 'data:import "node:fs";'
'fs' -> $AWRAP = 'data:import "$BWRAP";'
$AWRAP:
import "$BWRAP";
[A]:
identifies itself, skips all mapping
"$BWRAP" -> "$BWRAP"
$BWRAP:
import "node:fs"
[A]:
parentResolve()
[B]:
identifies itself, skips all mapping
"node:fs" -> "node:fs"
'node:fs' -> $AREWRAP = 'data:import "node:fs";'
$AREWRAP:
import "node:fs";
[A]:
identifies itself, skips all mapping
'node:fs' -> 'node:fs'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment