-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting Plugins to work with the kit #90
Comments
Hey, thanks for the issue. There's definitely some finickiness around plugins. We'll take a look next week. |
Looking at the vite docs, I can see that they actually ship with it built-in: https://vitejs.dev/config/shared-options.html#resolve-alias However, I fonud out why this isn't working. We're bundling video.js into the built file, so, there is always two versions of Video.js around. I'll take a look at how to separate it out so that aliasing will start working again. |
Figured out a workaround. If you alias video.js to point at videojs-mux-kit itself, it works: import { defineConfig } from 'vite';
export default defineConfig({
resolve: {
alias: {
'video.js': '@mux/videojs-kit',
},
},
}); I have a live example over here: https://stackblitz.com/edit/vitejs-vite-v8dbe2?file=main.js,package.json,vite.config.js&terminal=dev @Progression hopefully, that unblocks you. I'll continue looking into how to make the build better, though. I'm not sure that there's a way to avoid aliasing altogether, unfortunately. |
Gary, that is great, thanks so much for looking into this. I'm unable to try this out myself tonight but will see if I can jump over to this tomorrow and get it working. Will let you know. |
@gkatsev's solution also worked for me running webpacker in Rails with the I changed the alias from |
I need to use some plugins but am having issues getting them to work with the videojs-mux-kit version.
I have seen the note at the end of the readme regarding video.js/core situation. I've tried both solutions:
I guess what I'm really interested in knowing is has anyone got plugins to work with the latest version of videojs-mux-kit?
The text was updated successfully, but these errors were encountered: