[WIP] feat: embed std/node polyfill into the binary
Experiment.
This commits creates a single bundle file from "std/node/module_all.ts" and embeds it in "ext/node/03_std_node.js". This allows us to remove a lot of complexity in CLI related to setting up Node compat layer. Thanks to being snapshotted we can think about enabling this layer on each startup, which could help solve issues like https://github.com/denoland/deno/issues/16088.
Currently the produced bundle weighs at 1.8Mb. Compressed CLI snapshot weighs at 1093982 bytes, while on main it's 585684 bytes.
This should also make is significantly easier to support "node:<module_name>" imports in all code.
Is it possible to use a git submodule? Or are you wanting to move the source of truth here?
Is it possible to use a git submodule? Or are you wanting to move the source of truth here?
Neither approach makes sense IMO - we will create a script that bundles std/node into 03_std_node.js, because just pure bundling is not enough, we need to modify bundled file to "export" some things using "window.__bootstrap" namespace.
Closing in favor of https://github.com/denoland/deno/pull/17724