You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// now all previews will always print hello world to the console.
385
+
```
386
+
344
387
### ▸ `teardown`
345
388
346
389
Destroys the WebContainer instance, turning it unusable, and releases its resources. After this, a new WebContainer instance can be obtained by calling [`boot`](#▸-boot).
@@ -1103,6 +1146,40 @@ Globbing patterns to exclude files from the export.
1103
1146
1104
1147
---
1105
1148
1149
+
## `PreviewScriptOptions`
1150
+
1151
+
Options that control attributes on a script injected into previews.
1152
+
1153
+
```ts
1154
+
exportinterfacePreviewScriptOptions {
1155
+
type?:'module'|'importmap';
1156
+
defer?:boolean;
1157
+
async?:boolean;
1158
+
}
1159
+
```
1160
+
1161
+
### `PreviewScriptOptions` Properties
1162
+
1163
+
<br />
1164
+
1165
+
#### ▸ `type?: 'module' | 'importmap'`
1166
+
1167
+
The type attribute to use for the script. For more information, check the [MDN page on the script: type attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type).
1168
+
1169
+
<br />
1170
+
1171
+
#### ▸ `defer?: boolean`
1172
+
1173
+
If set to true, then the `defer` attribute will be set on the script tag. For more information, check the [MDN page on the script: defer attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#async).
1174
+
1175
+
<br />
1176
+
1177
+
#### ▸ `async?: boolean`
1178
+
1179
+
If set to true, then the `async` attribute will be set on the script tag. For more information, check the [MDN page on the script: async attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#async).
1180
+
1181
+
---
1182
+
1106
1183
## `WebContainerProcess`
1107
1184
1108
1185
A running process spawned in a [WebContainer](#webcontainer) instance.
0 commit comments