-
Notifications
You must be signed in to change notification settings - Fork 296
2.x to 3.x changes
Patrik Simek edited this page Jun 16, 2016
·
12 revisions
- To contextify objects between sandboxes v3 uses Proxies rather than deep clone.
- Native modules are no longer recompiled in sandbox, they're now Proxied.
- There is no need to call functions inside sandbox with
vm.call
method. - Issue with Buffer not being instance of Buffer is now fixed (#22).
let options = {
console: 'inherit',
sandbox: {},
require: true,
requireExternal: true,
requireNative: ['fs', 'path'],
requireRoot : "./",
useStrict: true
};
changed to:
let options = {
console: 'inherit',
sandbox: {},
require: {
external: true,
native: ['fs', 'path'],
root : "./"
}
};
NOTE: useStrict
option was removed.