diff --git a/.gitignore b/.gitignore
index 693bb50a6..e918d5c33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -106,6 +106,7 @@ datadog-ci.json
# Babel Plugin assets
packages/react-native-babel-plugin/assets/*
packages/react-native-babel-plugin/svg-map.json
+packages/react-native-babel-plugin/svg-map-*.json
# Session Replay assets
packages/react-native-session-replay/assets/*
diff --git a/LICENSE-3rdparty.csv b/LICENSE-3rdparty.csv
index 08f0dfb79..eb5a6731c 100644
--- a/LICENSE-3rdparty.csv
+++ b/LICENSE-3rdparty.csv
@@ -3,6 +3,7 @@ prod,big-integer,Unlicense,"Free and unencumbered software released into the pub
prod,lodash.isequal,CC0,"Copyright jQuery Foundation and other contributors "
prod,react-native,MIT,"Copyright (c) Facebook, Inc. and its affiliates."
dev,@apollo/client,MIT,"Copyright (c) 2022 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.)"
+dev,babel-plugin-module-resolver,MIT,"Copyright (c) 2015 Tommy Leunen (tommyleunen.com)"
dev,@babel/plugin-transform-runtime,MIT,"Copyright (c) 2014-present Sebastian McKenzie and other contributors"
dev,@testing-library/react-native,MIT,"Copyright (c) 2018 Callstack and Rally Health"
dev,@types/jest,MIT,"Copyrights are respective of each contributor listed at the beginning of each definition file."
@@ -40,4 +41,5 @@ prod,spark-md5,WTFPL OR MIT,"Copyright (C) 2015 André Cruz
prod,chokidar,MIT,"Copyright (c) 2012 Paul Miller (https://paulmillr.com), Elan Shanker"
prod,fast-glob,MIT,"Copyright (c) Denis Malinochkin"
prod,svgo,MIT,"Copyright (c) Kir Belevich"
+prod,tsconfig-paths,MIT,"Copyright (c) 2016 Jonas Kello"
prod,uuid,MIT,"Copyright (c) 2010-2020 Robert Kieffer and other contributors"
diff --git a/benchmarks/babel.config.js b/benchmarks/babel.config.js
index d79333729..1c8e051d1 100644
--- a/benchmarks/babel.config.js
+++ b/benchmarks/babel.config.js
@@ -1,10 +1,35 @@
+const path = require('path');
+
+const aliasFixturePath = './src/scenario/SessionReplay/component/assets/alias-fixtures';
+const aliasFixtureDir = path.resolve(__dirname, aliasFixturePath);
+
module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: [
+ ['module-resolver', {
+ root: ['./src'],
+ alias: {
+ '@assets': './src/scenario/SessionReplay/component/assets',
+ // H2: extensionless import mapped directly to a repository-owned SVG.
+ '@heart-logo': `${aliasFixturePath}/checkmark.svg`,
+ // H3: absolute path to the same local fixture directory.
+ '@absoluteAssets': aliasFixtureDir
+ }
+ }],
['@datadog/mobile-react-native-babel-plugin', {
sessionReplay: {
svgTracking: true
}
}]
- ]
+ ],
+ overrides: [{
+ test: /[\\/]assets[\\/]alias-fixtures[\\/]/,
+ // H2-H4 must be wrapped through the importing alias, rather than by
+ // independently instrumenting the fixtures' generated