mirror of
https://github.com/luxfi/wallet.git
synced 2026-07-27 03:37:41 +00:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user