You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried using simple vite.config.ts from apps/vite which works until icons from LucideIcons are imported and used.
I get a lot of errors like this one:
[ERROR] Could not resolve "react-native-svg"
node_modules/@tamagui/lucide-icons/dist/esm/icons/wind.mjs:2:26:
2 │ import { Svg, Path } from "react-native-svg";
Adding yarn add react-native-svg gives many of these errors:
[ERROR] Could not resolve "react-native"
node_modules/react-native-svg/lib/module/fabric/NativeSvgRenderableModule.js:4:36:
4 │ import { TurboModuleRegistry } from 'react-native';
Adding tamagui.config.ts to root and the next config to vite.config.ts removes errors:
import { config } from "@tamagui/config/v3";
import { TamaguiProvider, createTamagui } from "tamagui";
import { ExternalLink } from "@tamagui/lucide-icons";
// you usually export this from a tamagui.config.ts file
const tamaguiConfig = createTamagui(config);
// make TypeScript type everything based on your config
type Conf = typeof tamaguiConfig;
declare module "@tamagui/core" {
interface TamaguiCustomConfig extends Conf {}
}
function App() {
return (
<TamaguiProviderconfig={tamaguiConfig}>
<ExternalLink />
</TamaguiProvider>
);
}
export default App;
Current Behavior
I tried using simple
vite.config.ts
fromapps/vite
which works until icons from LucideIcons are imported and used.I get a lot of errors like this one:
Adding
yarn add react-native-svg
gives many of these errors:Adding
tamagui.config.ts
to root and the next config tovite.config.ts
removes errors:Expected Behavior
LucideIcons shoudln't break site when using vite config from
apps/vite
.So this should work:
just as it works with this:
Tamagui Version
Platform (Web, iOS, Android)
Reproduction
vite.config.ts
fromapps/vite
:App.tsx
:System Info
The text was updated successfully, but these errors were encountered: