shared-worker-loader
v0.2.0
Published
Shared Worker loader for Webpack
Downloads
218
Maintainers
Readme
Shared Worker loader
Shared Worker loader for Webpack.
Usage
var sharedWorker = require('shared-worker!./file.js')
var worker = new sharedWorker(name) // name is optional
worker.port.onmessage = (e) => {...}
worker.port.postMessage({foo: 'bar'})
worker.port.start()
Credits
Thanks @sokra for providing the codebase found within worker-loader!
License
MIT (http://www.opensource.org/licenses/mit-license.php)