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
The plugin responds to the following configuration options:
40
40
```javascript
41
41
webWorkerLoader({
42
-
sourcemap: boolean, // should a source map be included in the final output
42
+
sourcemap?: boolean, // when inlined, should a source map be included in the final output. Default: false
43
+
inline?: boolean, // should the worker code be inlined (Base64). Default: true
44
+
loadPath?: string // this options is useful when the worker scripts need to be loaded from another folder. Default: ''
43
45
})
44
46
```
45
47
48
+
### Notes
49
+
WARNING: To use code-splitting for the worker scripts, Rollup v1.9.2 or higher is required. See https://github.com/rollup/rollup/issues/2801 for more details.
50
+
51
+
The `sourcemap` configuration option is ignored when `inline` is set to `false`, in that case the project's sourcemap configuration is inherited.
52
+
53
+
`loadPath` is meant to be used in situations where code-splitting is used (`inline = false`) and the entry script is hosted in a different folder than the worker code.
54
+
55
+
46
56
### Roadmap
47
57
-[x] Bundle file as web worker blob
48
58
-[x] Support for dependencies using `import`
49
59
-[x] Include source map
60
+
-[x] Configuration options to inline or code-split workers
0 commit comments