worker-loader

worker loader module for webpack

worker loader for webpack

var MyWorker = require("worker!./file.js");

var worker = new MyWorker(); worker.postMessage({a: 1}); worker.onmessage = function(event) {...}; worker.addEventListener("message", function(event) {...});

Don't forget to polyfill require if you want to use it in node. See webpack documentation.

MIT (http://www.opensource.org/licenses/mit-license.php)