videojs / videojs-contrib-ads

A Tool for Building Video.js Ad Plugins
http://videojs.github.io/videojs-contrib-ads/
Other
381 stars 257 forks source link

Make video.js as peerDependencies #518

Closed ckybonist closed 4 years ago

ckybonist commented 4 years ago

Please see https://github.com/googleads/videojs-ima/pull/912

gkatsev commented 4 years ago

This has been something that we've been thinking about for a while. Generally, the issue of having multiple versions in the bundle goes away if you use compatible versions of Video.js, which also why our version range is fairly unrestrictive. Historically, we've avoided peerDeps because the way npm worked made it not usable for us. I believe a lot of those issues have been addressed on the npm side but we haven't had the chance to take a look at the implications of doing this.

ckybonist commented 4 years ago

Okay. Just workaround this issue by setting webpack alias path like:

alias: {
    src: path.resolve(__dirname, '../../src'),
    assets: path.resolve(__dirname, '../../assets'),
    'video.js': path.resolve(__dirname, '../../node_modules/video.js')
  }