-
You can use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
As you have likely noticed, the Mechanically, CommonJS requires the use of import hooks and virtual module sources. The The |
Beta Was this translation helpful? Give feedback.
As you have likely noticed, the
Compartment
API is very generic. The Compartment Mapper is one of many possible ways to bind compartments to specific module systems, specifically an approximation of Node.js that supports both CommonJS and ESM, in a style that is consistent with the needs of bundlers. The yet higher level@endo/bundle-source
and@endo/import-bundle
packages provide a specific zip-file based bundler that Agoric uses for contracts. The compartment mapper also has abundle.js
based onCompartment
that is suitable for boot-strapping a script bundle (but not suitable for confinement). There are secure bundlers in the community based on Hardened JavaScript compartments: @naugtur …