Webpack worker-loader versus worker-plugin

762 Views Asked by At

What are the benefits of using worker-plugin compared to worker-loader for workers in webpack, and why? Which one is better?

1

There are 1 best solutions below

0
On BEST ANSWER

The primary difference is that Worker-Plugin allows you to write completely standard syntax that would run without Webpack, and bundles it behind the scenes. Worker-Loader introduces its own API (though it is a simple one) that is specific to Webpack.