Create and initialize a new VfsSandbox in one step.
This is the recommended way to create a sandbox. It combines construction and initialization into a single async operation.
create(options: VfsSandboxOptions): Promise<VfsSandbox>| Name | Type | Description |
|---|---|---|
options | VfsSandboxOptions | Configuration options for the sandbox |
const sandbox = await VfsSandbox.create({
initialFiles: {
"/src/index.js": "console.log('Hello')",
},
});