| 49 | }); |
| 50 | |
| 51 | const chartKitPreviewWebAliases = () => ({ |
| 52 | name: "chart-kit-preview-web-aliases", |
| 53 | enforce: "pre", |
| 54 | resolveId(source, importer) { |
| 55 | if (source === "react-native") { |
| 56 | return reactNativeWebStub; |
| 57 | } |
| 58 | |
| 59 | if (source === "react-native-gesture-handler") { |
| 60 | return reactNativeGestureHandlerStub; |
| 61 | } |
| 62 | |
| 63 | if (source === "@expo/vector-icons/Ionicons") { |
| 64 | return expoVectorIconsStub; |
| 65 | } |
| 66 | |
| 67 | if (source === "react-native-chart-kit") { |
| 68 | return packageSource("react-native/src/index.ts"); |
| 69 | } |
| 70 | |
| 71 | if ( |
| 72 | importer?.includes( |
| 73 | "react-native-svg/lib/module/lib/extract/extractTransform" |
| 74 | ) && |
| 75 | (source === "./transform" || source === "./transformToRn") |
| 76 | ) { |
| 77 | return svgTransformParserStub; |
| 78 | } |
| 79 | } |
| 80 | }); |
| 81 | |
| 82 | export default defineConfig({ |
| 83 | site: "https://chartkit.io", |