- Issue created by @lrwebks
- 🇩🇪Germany Grevil
@thomas.frobieter suggested, that we simply build the library ourselves and put it in the module (if the license allows this). Assigning to him for now, so he can check that. Also, this is major, as we can not use the library in the current state unfortunately.
Right, I built it and its a massive pain. However, as a temporary solution, until https://github.com/vidstack/player/issues/719 is hopefully fixed one day, we build it ourselves to push things forward.
To build successfully the vidstack/player repo needs to be modified:
- package.json: change workspaces "./packages/*" to "packages/*"
- pnpm-workspace.yaml: change 'packages/*' to './packages/*'
- Ensure to install pnpm@8.7.0 globaly using npm
- Ensure to use npm version 18.17.1 using nvm (nvm install v18.17.1)
- In packages/react/package.json replace "vidstack": "workspace:*" with "vidstack": "^1.12.13"
- Afterwards runnpm cache clear --force
rm -rf node_modules
npm install
. Next runpnpm install
.
- Then you should be able to runnpm run build
To be sure, used versions:
- node: 18.17.1
- npm 9.6.7
- pnpm: 8.7.0Welcome to the node.js building rabbit hole from hell.
Afterwards the required files are located here:
- packages/react/dist-npm/prod/vidstack.js (unminified, I was to able to build the minified version)
- packages/vidstack/styles/player/plyr/theme.css
- packages/vidstack/styles/player/default/layouts/video.cssMaybe we should simply copy the current files from the CDN source instead using this, overcomplicated, bug prone build process:
- vidstack.js: https://cdn.vidstack.io/player
- theme.css: https://cdn.vidstack.io/player/theme.css
- video.css: https://cdn.vidstack.io/player/video.cssInstead of adding the library to the modules repo, we could release it as an NPM package ourselves and use this as a Composer dependency. Seems like a cleaner approach?