videojs / videojs-contrib-hls

HLS library for video.js
http://videojs.github.io/videojs-contrib-hls/
Other
2.84k stars 792 forks source link

use webwackify for webworkers to support webpack bundle #1363

Closed mjneil closed 6 years ago

mjneil commented 6 years ago

Regarding the require.resolve:

webpack resolves module names to ids during compile time. One of the issues with webworkify-webpack-dropin was that it used regex to search for the require statements to get the resolved module id so it could properly setup the bootstrapfn to start at the right module. This broke in some cases with minification because the regex would get messed up. By passing the module id directly from require.resolve, you dont have to do any of the regex work, and can just build the entire module list and have the starting id given to you. This problem is described in more detail here https://github.com/videojs/videojs-contrib-hls/issues/600#issuecomment-293550845

forbesjo commented 6 years ago

This change looks good to me save for the big package-lock changes