Skip to main content

Interface: ClientOptions

Properties

bundlerURL

Optional bundlerURL: string

Location of the bundler.

Defined in

client.ts:35


clearConsoleOnFirstCompile

Optional clearConsoleOnFirstCompile: boolean

The bundler will clear the console if you set this to true, everytime the iframe refreshes / starts the first compile

Defined in

client.ts:67


externalResources

Optional externalResources: string[]

Paths to external resources

Defined in

client.ts:31


fileResolver

Optional fileResolver: Object

You can pass a custom file resolver that is responsible for resolving files. We will use this to get all files from the file system.

Type declaration

NameType
isFile(path: string) => Promise<boolean>
readFile(path: string) => Promise<string>

Defined in

client.ts:73


height

Optional height: string

Height of iframe.

Defined in

client.ts:51


logLevel

Optional logLevel: SandpackLogLevel

Level of logging to do in the bundler

Defined in

client.ts:39


reactDevTools

Optional reactDevTools: ReactDevToolsMode

Defined in

client.ts:78


showErrorScreen

Optional showErrorScreen: boolean

Defined in

client.ts:61


showLoadingScreen

Optional showLoadingScreen: boolean

Defined in

client.ts:62


showOpenInCodeSandbox

Optional showOpenInCodeSandbox: boolean

Boolean flags to trigger certain UI elements in the bundler

Defined in

client.ts:60


skipEval

Optional skipEval: boolean

If we should skip the third step: evaluation.

Defined in

client.ts:55


startRoute

Optional startRoute: string

Relative path that the iframe loads (eg: /about)

Defined in

client.ts:43


width

Optional width: string

Width of iframe.

Defined in

client.ts:47