You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I upgraded @vitejs/plugin-vue from 5.2.1 to 5.2.2 and now the component ids in my CI are different from the component ids on my machine where the snaps are generated.
In one of my components, in @vitejs/plugin-vue 5.2.1 the component id was data-v-f895525f on both my machine and the CI.
After upgrading to 5.2.2, the the component id on my machine is data-v-7ecf2a22 while in CI it is data-v-33eca55f.
Thus all my tests with snapshots are now failing.
Two questions arise, why have the ids changed at all, and why are they now different on different machines?
The documentation clearly states that componentIdGenerator='filepath', which I presume is the default, "hash the file path (relative to the project root)" should use the relative path.
Yet the change clearly uses the relative path only in the componentIdGenerator='function' case.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Related plugins
plugin-vue
plugin-vue-jsx
Describe the bug
I upgraded @vitejs/plugin-vue from 5.2.1 to 5.2.2 and now the component ids in my CI are different from the component ids on my machine where the snaps are generated.
In one of my components, in @vitejs/plugin-vue 5.2.1 the component id was data-v-f895525f on both my machine and the CI.
After upgrading to 5.2.2, the the component id on my machine is data-v-7ecf2a22 while in CI it is data-v-33eca55f.
Thus all my tests with snapshots are now failing.
Two questions arise, why have the ids changed at all, and why are they now different on different machines?
Reproduction
n/a
Steps to reproduce
No response
System Info
Used Package Manager
pnpm
Logs
It is clearly caused by this change #538
The documentation clearly states that
componentIdGenerator='filepath'
, which I presume is the default, "hash the file path (relative to the project root)" should use the relative path.Yet the change clearly uses the relative path only in the
componentIdGenerator='function'
case.Validations
The text was updated successfully, but these errors were encountered: