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
fix(FaceLandmarker): default basePath aligned with tasks-vision package version #1510
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 046b888:
|
@@ -13,7 +13,7 @@ type FaceLandmarkerProps = { | |||
} | |||
|
|||
export const FaceLandmarkerDefaults = { | |||
basePath: 'https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.0/wasm', | |||
basePath: `https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@${process.env.ROLLUP_REPLACE_MEDIAPIPE_TASKS_VISION_VERSION}/wasm`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the purpose replacement of this PR
|
||
export default { | ||
plugins: [glslify()], | ||
plugins: [replace(replacements), glslify()], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rollup/plugin-replace
is compatible with Vite
let you review @CodyJasonBennett since it touches rollup.config.js and is related to @mediapipe/tasks-vision bump from #1509 |
This relies on pinning the version so we can't use loose ranges via |
In my mind we can use any ranges since it reads the version directly from I've checked with our currently defined |
2d46fb3
to
046b888
Compare
Why / What
In
FaceLandmarkerDefaults.basePath
the version was until now hardcoded:0.10.0
drei/src/core/FaceLandmarker.tsx
Line 16 in 93d779d
This PR lets use @rollup/plugin-replace(compatible with Vite) to make it dynamic, with the version of the installed @mediapipe/tasks-vision package
Checklist
Documentation updated (example)Storybook entry added (example)