interface ScriptOptions
extends BaseOptions
Usage
import { type ScriptOptions } from "node:vm";
optional
cachedData: Buffer | ArrayBufferView | undefined
V8's code cache data for the supplied source.
deprecated
optional
produceCachedData: boolean | undefined
optional
importModuleDynamically: ((specifier: string, script: Script, importAttributes: ImportAttributes) => Module) | undefined
Called during evaluation of this module when import() is called.
If this option is not specified, calls to import() will reject with ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING.