Skip to content

chore: enable absolute import paths #14556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ module.exports = {
plugins: [
'transform-inline-environment-variables',
'react-native-reanimated/plugin',
[
'module-resolver',
{
root: ['.'],
alias: {
'~/app': './app',
'~/locales': './locales',
'~/e2e': './e2e',
},
},
],
],
overrides: [
{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@
"babel-jest": "^29.7.0",
"babel-loader": "^9.1.3",
"babel-plugin-inline-import": "^3.0.0",
"babel-plugin-module-resolver": "^5.0.2",
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
"babel-plugin-transform-remove-console": "6.9.4",
"browserstack-local": "^1.5.1",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {
"images/*": ["./app/images/*"],
"@keystonehq/ur-decoder": ["app/declarations/@keystonehq/ur-decoder.ts"]
"@keystonehq/ur-decoder": ["app/declarations/@keystonehq/ur-decoder.ts"],
"~/*": ["*"]
} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12399,7 +12399,7 @@ babel-plugin-jest-hoist@^29.6.3:
"@types/babel__core" "^7.1.14"
"@types/babel__traverse" "^7.0.6"

babel-plugin-module-resolver@^5.0.0:
babel-plugin-module-resolver@^5.0.0, babel-plugin-module-resolver@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.2.tgz#cdeac5d4aaa3b08dd1ac23ddbf516660ed2d293e"
integrity sha512-9KtaCazHee2xc0ibfqsDeamwDps6FZNo5S0Q81dUqEuFzVwPhcT4J5jOqIVvgCA3Q/wO9hKYxN/Ds3tIsp5ygg==
Expand Down
Loading