File tree Expand file tree Collapse file tree 3 files changed +527
-353
lines changed
Expand file tree Collapse file tree 3 files changed +527
-353
lines changed Original file line number Diff line number Diff line change 77![ NPM Version] ( https://img.shields.io/npm/d18m/vite-plugin-comlink )
88
99
10- > This plugins requires vite >=2.8 for WebWorkers and vite >= 2.9.6 for shared worker to work properly.
10+ > This plugin requires vite >=5
1111
1212Use WebWorkers with comlink.
1313
1414This plugin removes the need to call ` expose ` , ` wrap ` from comlink and also you don't need to create the worker on your own.
1515
16- ## Upgrade Vite 4 to Vite 5
17-
18- Make sure that you change the worker plugin config to a function for example like this
19-
20- ``` ts
21- // vite.config.js
22- export default {
23- worker: {
24- plugins : () => [comlink ()],
25- },
26- };
27- ```
28-
29- see https://github.com/vitejs/vite/pull/14685 for details.
30-
3116## Install
3217
3318``` sh
You can’t perform that action at this time.
0 commit comments