What
Remove the verbose Inkscape/sodipodi/RDF authoring metadata that is embedded inside the inline SVGs in HelloWorld.vue, and optionally extract those SVGs into dedicated component files.
Why
HelloWorld.vue is currently 373 KB / 1,274 lines, which is unusually large for a single Vue SFC. A significant portion of this bloat comes from SVG <metadata> blocks, sodipodi:* attributes, inkscape:* attributes, and RDF/CC/DC namespace declarations that Inkscape adds to files when saving – none of which have any effect on how the SVG renders in a browser.
Stripping this dead markup will:
- Shrink the component source file and improve developer readability.
- Reduce JavaScript bundle size – Vite inlines template strings, so larger templates → larger JS bundles.
- Speed up Vue template compilation at build time.
Rough estimate: at least ~81 lines of pure Inkscape/RDF noise across the SVGs (PDF icon, C-book cover, blog icon, and others).
How
- For each inline
<svg> that contains <metadata>, sodipodi:*, inkscape:*, xmlns:rdf, xmlns:cc, xmlns:dc attributes/elements:
- Remove the
<metadata>...</metadata> block entirely.
- Remove
<sodipodi:namedview> (if present).
- Strip
xmlns:sodipodi, xmlns:inkscape, xmlns:rdf, xmlns:cc, xmlns:dc, xmlns:svg namespace declarations from the root <svg> element.
- Strip
inkscape:* and sodipodi:* attributes from any descendant elements.
- Optionally, extract each SVG into a
src/assets/ file (e.g., pdf-icon.svg, c-book.svg) and import it with Vite's ?component or ?raw transform to keep HelloWorld.vue maintainable.
- Run
npm run build and npm run lint to verify nothing breaks.
Verification
Generated by Continuous Improvement — Portfolio Site · ● 7.9M · ◷
What
Remove the verbose Inkscape/sodipodi/RDF authoring metadata that is embedded inside the inline SVGs in
HelloWorld.vue, and optionally extract those SVGs into dedicated component files.Why
HelloWorld.vueis currently 373 KB / 1,274 lines, which is unusually large for a single Vue SFC. A significant portion of this bloat comes from SVG<metadata>blocks,sodipodi:*attributes,inkscape:*attributes, and RDF/CC/DC namespace declarations that Inkscape adds to files when saving – none of which have any effect on how the SVG renders in a browser.Stripping this dead markup will:
Rough estimate: at least ~81 lines of pure Inkscape/RDF noise across the SVGs (PDF icon, C-book cover, blog icon, and others).
How
<svg>that contains<metadata>,sodipodi:*,inkscape:*,xmlns:rdf,xmlns:cc,xmlns:dcattributes/elements:<metadata>...</metadata>block entirely.<sodipodi:namedview>(if present).xmlns:sodipodi,xmlns:inkscape,xmlns:rdf,xmlns:cc,xmlns:dc,xmlns:svgnamespace declarations from the root<svg>element.inkscape:*andsodipodi:*attributes from any descendant elements.src/assets/file (e.g.,pdf-icon.svg,c-book.svg) and import it with Vite's?componentor?rawtransform to keepHelloWorld.vuemaintainable.npm run buildandnpm run lintto verify nothing breaks.Verification
npm run buildpassesnpm run lintpassesHelloWorld.vuefile size is noticeably reduced