[compiler] Add babel-plugin-idx to snap

To surface any potential conflicts with this plugin, let's install it
into snap so we can surface any runtime errors after compilation

ghstack-source-id: 545eee6fb7f6401e919422581cf64070da581d50
Pull Request resolved: https://github.com/facebook/react/pull/30434
This commit is contained in:
Lauren Tan
2024-07-23 15:46:56 -04:00
parent fc74a3a3e6
commit 08b4ee83cc
3 changed files with 12 additions and 1 deletions

View File

@@ -24,6 +24,7 @@
"@babel/preset-typescript": "^7.18.6",
"@parcel/watcher": "^2.1.0",
"@testing-library/react": "^13.4.0",
"babel-plugin-idx": "^3.0.3",
"babel-plugin-syntax-hermes-parser": "^0.15.1",
"chalk": "4",
"fbt": "^1.0.0",

View File

@@ -250,7 +250,11 @@ function getEvaluatorPresets(
): Array<BabelCore.PluginItem> {
const presets: Array<BabelCore.PluginItem> = [
{
plugins: ['babel-plugin-fbt', 'babel-plugin-fbt-runtime'],
plugins: [
'babel-plugin-fbt',
'babel-plugin-fbt-runtime',
'babel-plugin-idx',
],
},
];
presets.push(
@@ -365,6 +369,7 @@ export async function transformFixtureInput(
[plugin, options],
'babel-plugin-fbt',
'babel-plugin-fbt-runtime',
'babel-plugin-idx',
],
sourceType: 'module',
ast: includeEvaluator,

View File

@@ -3768,6 +3768,11 @@ babel-plugin-fbt@^1.0.0:
nullthrows "^1.1.1"
yargs "^15.3.1"
babel-plugin-idx@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/babel-plugin-idx/-/babel-plugin-idx-3.0.3.tgz#326d25772210a40ff7fc63eee7f3ed239e8dc9ed"
integrity sha512-05baCoIGsvZJKemq6KQ4KVFlweEpY4aSY56wk3W781JxCNW3u0KfBElBt26/cPZbHkjF1mnwGIOlFY+9I/VOZA==
babel-plugin-istanbul@^6.1.1:
version "6.1.1"
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73"