fix(extension): repair svg-import-fix transform body + restore optimizeDeps wrapper

The transform function for the 'svg-import-fix' plugin was missing its body
and return statement. The list of bundled deps that follows ('tamagui',
'@tamagui/web', etc.) was orphaned without an optimizeDeps.include wrapper.
Restored both:
- transform body returns code with import { ReactComponent as N } from '*.svg'
- optimizeDeps.include array properly opened/closed around the dep list
This commit is contained in:
Hanzo AI
2026-06-10 22:35:40 -07:00
committed by zeekay
parent 79a4645aac
commit 64268180bf
+7
View File
@@ -237,6 +237,13 @@ export default defineConfig({
name: 'svg-import-fix',
transform(code: string) {
const regex = /import\s+([a-zA-Z0-9_$]+)\s+from\s+['"]([^'"]+\.svg)['"]/g
return code.replace(regex, "import { ReactComponent as $1 } from '$2'")
},
},
],
optimizeDeps: {
include: [
'tamagui',
'@tamagui/web',
'ui',