-
Notifications
You must be signed in to change notification settings - Fork 149
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: use react-inline-svg-unique-id plugin for fix svg id issue in runtime #616
Conversation
🦋 Changeset detectedLatest commit: 8178ec8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
之前的 id 避免重复的方案是构建时加前缀,但是同一个文件的前缀是一样的,所以当一个 icon 多次使用的时候 id 还是会有问题。通过 https://github.com/laleksiunas/inline-svg-unique-id 插件改为运行时修改,每次的 id 都不一样,就不会有这个问题了。 |
更多讨论可以参考 svg/svgo#674 这个 issue |
vitest 配置还是用的 svgo,看看需不需要也改一下: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #616 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 649 649
Lines 17430 17430
Branches 1054 1055 +1
=========================================
Hits 17430 17430 ☔ View full report in Codecov by Sentry. |
直接去掉了,现在应该 id 可以随便搞了 |
vitest 上我试了下用这个插件,好像没啥用,不知道是不是和 vitest 构建的逻辑不兼容,现在测试和构建用的不是一套基础构建方案,不太好保持一致。 |
这个 ci 错误是一个深层依赖导致的,而且偶发,我尝试解决一下:
|
感觉把 coinbase 这个 mock 下应该能行 |
close #581