israelss / vue-worker

A Vue.js plugin to use webworkers in a simply way.
MIT License
593 stars 41 forks source link

can support vue3 #29

Open ewrfedf opened 3 years ago

Lutymane commented 3 years ago

Basically this in your main.js

import { createApp } from 'vue'
import App from './App.vue'
import SimpleWebWorker from 'simple-web-worker'

const app = createApp(App)
app.config.globalProperties.$worker = SimpleWebWorker;

app.mount('#app')