diff --git a/packages/vite-flow/package.json b/packages/vite-flow/package.json index c4e51b62a..927066821 100644 --- a/packages/vite-flow/package.json +++ b/packages/vite-flow/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@babel/core": "^7.21.8", - "metro-react-native-babel-preset": "^0.77.0" + "@react-native/babel-preset": "^0.74.84" }, "devDependencies": { "@biomejs/biome": "^1.6.3", diff --git a/packages/vite-flow/src/index.ts b/packages/vite-flow/src/index.ts index 1548fb860..24452f3e5 100644 --- a/packages/vite-flow/src/index.ts +++ b/packages/vite-flow/src/index.ts @@ -7,7 +7,7 @@ export async function transformFlow(input: string) { babel.transform( input, { - presets: ['module:metro-react-native-babel-preset'], + presets: ['module:@react-native/babel-preset'], }, (err: any, result) => { if (!result || err) rej(err || 'no res') diff --git a/yarn.lock b/yarn.lock index 3b3c998e2..5e6d4d492 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4616,7 +4616,7 @@ __metadata: languageName: node linkType: hard -"@react-native/babel-preset@npm:0.74.84": +"@react-native/babel-preset@npm:0.74.84, @react-native/babel-preset@npm:^0.74.84": version: 0.74.84 resolution: "@react-native/babel-preset@npm:0.74.84" dependencies: @@ -7418,8 +7418,8 @@ __metadata: dependencies: "@babel/core": ^7.21.8 "@biomejs/biome": ^1.6.3 + "@react-native/babel-preset": ^0.74.84 "@tamagui/build": ^1.100.0 - metro-react-native-babel-preset: ^0.77.0 vite: 6.0.0-alpha.18 languageName: unknown linkType: soft @@ -13086,55 +13086,6 @@ __metadata: languageName: node linkType: hard -"metro-react-native-babel-preset@npm:^0.77.0": - version: 0.77.0 - resolution: "metro-react-native-babel-preset@npm:0.77.0" - dependencies: - "@babel/core": ^7.20.0 - "@babel/plugin-proposal-async-generator-functions": ^7.0.0 - "@babel/plugin-proposal-class-properties": ^7.18.0 - "@babel/plugin-proposal-export-default-from": ^7.0.0 - "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.0 - "@babel/plugin-proposal-numeric-separator": ^7.0.0 - "@babel/plugin-proposal-object-rest-spread": ^7.20.0 - "@babel/plugin-proposal-optional-catch-binding": ^7.0.0 - "@babel/plugin-proposal-optional-chaining": ^7.20.0 - "@babel/plugin-syntax-dynamic-import": ^7.8.0 - "@babel/plugin-syntax-export-default-from": ^7.0.0 - "@babel/plugin-syntax-flow": ^7.18.0 - "@babel/plugin-syntax-nullish-coalescing-operator": ^7.0.0 - "@babel/plugin-syntax-optional-chaining": ^7.0.0 - "@babel/plugin-transform-arrow-functions": ^7.0.0 - "@babel/plugin-transform-async-to-generator": ^7.20.0 - "@babel/plugin-transform-block-scoping": ^7.0.0 - "@babel/plugin-transform-classes": ^7.0.0 - "@babel/plugin-transform-computed-properties": ^7.0.0 - "@babel/plugin-transform-destructuring": ^7.20.0 - "@babel/plugin-transform-flow-strip-types": ^7.20.0 - "@babel/plugin-transform-function-name": ^7.0.0 - "@babel/plugin-transform-literals": ^7.0.0 - "@babel/plugin-transform-modules-commonjs": ^7.0.0 - "@babel/plugin-transform-named-capturing-groups-regex": ^7.0.0 - "@babel/plugin-transform-parameters": ^7.0.0 - "@babel/plugin-transform-react-display-name": ^7.0.0 - "@babel/plugin-transform-react-jsx": ^7.0.0 - "@babel/plugin-transform-react-jsx-self": ^7.0.0 - "@babel/plugin-transform-react-jsx-source": ^7.0.0 - "@babel/plugin-transform-runtime": ^7.0.0 - "@babel/plugin-transform-shorthand-properties": ^7.0.0 - "@babel/plugin-transform-spread": ^7.0.0 - "@babel/plugin-transform-sticky-regex": ^7.0.0 - "@babel/plugin-transform-typescript": ^7.5.0 - "@babel/plugin-transform-unicode-regex": ^7.0.0 - "@babel/template": ^7.0.0 - babel-plugin-transform-flow-enums: ^0.0.2 - react-refresh: ^0.4.0 - peerDependencies: - "@babel/core": "*" - checksum: 09fb64735d4517f62cb0cbd386bdfa64d0de5a4f8c85b54c36b5799b242e897295d58c9d18e124033233841d8fcd33a109dda3dd9f1e5554e516f689eef14a0d - languageName: node - linkType: hard - "metro-resolver@npm:0.80.8": version: 0.80.8 resolution: "metro-resolver@npm:0.80.8" @@ -15029,13 +14980,6 @@ __metadata: languageName: node linkType: hard -"react-refresh@npm:^0.4.0": - version: 0.4.3 - resolution: "react-refresh@npm:0.4.3" - checksum: 58d3b899ede4c890b1d06a2d02254a77d1c0dea400be139940e47b1c451ff1c4cbb3ca5d0a9d6ee9574e570075ab6c1bef15e77b7270d4a6f571847d2b26f4fc - languageName: node - linkType: hard - "react-remove-scroll-bar@npm:^2.3.3": version: 2.3.6 resolution: "react-remove-scroll-bar@npm:2.3.6"