Hey,
I'm coming from hell, which is trying to make videojs-contrib-hls work with webpack videojs/videojs-contrib-hls#600, so I decided to give this module a try, and I was more lucky.
package.json should have a main entry pointing to the dist file, and in an ideal world dependencies to hls.js and video.js should be handled using the webpack standard factory function instead of relying on globals.
In the meantime, I thought I should put my working solution here :
npm i video.js@5
npm i videojs-hlsjs
npm i hlsjs.js
// webpack.config.js
{
resolve: {
alias: {
'videojs-hlsjs': 'videojs-hlsjs/dist/videojs-hlsjs.js'
},
},
plugins: [
new webpack.ProvidePlugin({
videojs: 'video.js',
'window.videojs': 'video.js',
'window.Hls': 'hls.js'
})
]
}
Hey,
I'm coming from hell, which is trying to make videojs-contrib-hls work with webpack videojs/videojs-contrib-hls#600, so I decided to give this module a try, and I was more lucky.
package.jsonshould have amainentry pointing to the dist file, and in an ideal world dependencies tohls.jsandvideo.jsshould be handled using the webpack standard factory function instead of relying on globals.In the meantime, I thought I should put my working solution here :