Bun

interface

vm.ScriptOptions

interface ScriptOptions

  • cachedData?: Buffer<ArrayBufferLike> | ArrayBufferView<ArrayBufferLike>

    Provides an optional data with V8's code cache data for the supplied source.

  • columnOffset?: number

    Specifies the column number offset that is displayed in stack traces produced by this script.

  • filename?: string

    Specifies the filename used in stack traces produced by this script.

  • importModuleDynamically?: number | (specifier: string, script: Script, importAttributes: ImportAttributes) => Module | Promise<Module>

    Used to specify how the modules should be loaded during the evaluation of this script when import() is called. This option is part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see Support of dynamic import() in compilation APIs.

  • lineOffset?: number

    Specifies the line number offset that is displayed in stack traces produced by this script.