feature(register): function for register plugin#607
feature(register): function for register plugin#607PhilipeGatis wants to merge 1 commit intocollab-project:masterfrom PhilipeGatis:master
Conversation
thijstriemstra
left a comment
There was a problem hiding this comment.
can you please provide a pull request description? and revert changes to package-lock.json?
Done! :) |
React (CRA) with craco. |
|
Hi! @PhilipeGatis did you found a solution in your case? Facing the same troubles with vue.js, so decided to import it through cdn for now |
|
I bumped into exactly the same thing using webpack, my debugging lead me to the same conclusion, as long as we are using a different videojs version from the one that is a dependency of the package the plugin will be applied to it's own videojs version and both versions will be imported If one forces the plugin in to use the current version as our platform for example https://github.com/7Ds7/videojs-record/blob/master/package.json#L77 only that version is imported and the plugin is applied correctly. This PR fixes that problem, furthermore i was inspecting old videojs plugin generators and when they build the final package they usually have this sort of check which |
This feature provides a plugin register function. I follow this strategy.
Why?
I got an error (plugin record not found) when i import videojs and then import videojs-record. I discover the plugin auto register occurs in another instance of videojs. In this function, I pass my imported instance to the plugin register.
example of use: