Vue.js in Web Worker
This is a starter app of Vue.js working in Web Worker using WorkerDOM, bundled by Rollup.js. This allows Vue.js to offload its work to a background thread and send updates back to the main thread asyncronously, which should greatly increase rendering performance. See this blog post for details.
Develop you Vue.js app as always, using
main.jsas an entry point. In
index.html, add a wrapper around
worker-dom.jslibrary like this:
npm installto set up the project. To build the files in
npm run buildor
rollup -c. Then start the local web server e.g.
python -m http.serverand go to http://localhost:8000. Your
index.htmlpage should load
worker-dom.js, which should asynchronously fetch and load both
main.jsmodules into Web Worker.
© 2020 Jerzy Głowacki under Apache Lincese 2.0