chore: 🤖 add normalisation pass in SVG convertor process/tool#978
chore: 🤖 add normalisation pass in SVG convertor process/tool#978
Conversation
🦋 Changeset detectedLatest commit: caa1eba The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Claude finished @punkbit's task in 1m 36s —— View job Code ReviewNice work on the normalization pass! The approach is solid — separating the SVGO normalization from SVGR's internal SVGO pass is a sensible fix for malformed SVG issues. A few things worth addressing: 🚨 Must Fix
💡 Suggestions (non-blocking)
|
|
Claude finished @punkbit's task in 1m 15s —— View job Code ReviewGreat follow-up — the previous must-fix ( Previous findings resolved ✅
💡 One remaining minor issue The inner } catch (error) {
}This is the same pattern as the outer cleanup — which now correctly logs a warning. For consistency, it should do the same: } catch (error) {
console.warn('⚠️ Failed to clean up temp SVGR config:', error.message);
}Note (non-blocking): The Otherwise this is solid. The two-phase approach (SVGO normalize → SVGR without SVGO) is clean and the conservative plugin config ( |
📚 Storybook Preview Deployed✅ Preview URL: https://click-29rd6mz5r-clickhouse.vercel.app Built from commit: |
Why?
SVG inputs can break conversion due to malformed markup. This adds a normalisation step (based on conservative optimisation to reduce chances of visual diff) to fix structural issues upfront.
How?
Preview?