launch a web worker that can require() in the browser with webpack, compatible with webworkify
npm install webworkify-webpack2Launch a web worker that can require() in the browser with webpack 2.
This fork of webworkify-webpack
should only be used as an alias for original webworkify
with webpack 2. It lets libraries that has webworkify dependency to be used with webpack 2
(e.g. videojs-contrib-hls).
First, replace webworkify with webworkify-webpack2 by creating an alias in your webpack config:
```
resolve: {
alias: {
webworkify: 'webworkify-webpack2'
}
}
Then use the library you are trying to integrate as you would normally do:
`js`
import 'videojs-contrib-hls';
With npm do:
`sh``
npm install webworkify-webpack2 --save
* While developing make sure not to set webpack's devtool option to be with some eval configuration because from 1.1.0 version it won't work - check #7
* When passing anonymous functions to webworkify-webpack2, naming them can prevent potential issues - #9, #10
MIT