Skip to content

Commit

Permalink
feat: fix module resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
sakul-budhathoki committed Jan 26, 2021
1 parent b135520 commit aee1d05
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 96 deletions.
15 changes: 0 additions & 15 deletions js/alias.js

This file was deleted.

13 changes: 10 additions & 3 deletions js/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
const alias = require('./alias')

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [['module-resolver', { alias }]],
plugins: [
[
'module-resolver',
{
alias: {
'@berty-tech': './packages/',
},
},
],
],
}
79 changes: 1 addition & 78 deletions js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,84 +39,7 @@
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "./" /* Base directory to resolve non-absolute module names. */,
"paths": {
"@berty-tech/api": [
"./packages/api"
],
"@berty-tech/api/*": [
"./packages/api/*"
],
"@berty-tech/assets": [
"./packages/assets"
],
"@berty-tech/assets/*": [
"./packages/assets/*"
],
"@berty-tech/berty-i18n": [
"./packages/berty-i18n"
],
"@berty-tech/berty-i18n/*": [
"./packages/berty-i18n/*"
],
"@berty-tech/components": [
"./packages/components"
],
"@berty-tech/components/*": [
"./packages/components/*"
],
"@berty-tech/config": [
"./packages/config"
],
"@berty-tech/config/*": [
"./packages/config/*"
],
"@berty-tech/go-bridge": [
"./packages/go-bridge"
],
"@berty-tech/go-bridge/*": [
"./packages/go-bridge/*"
],
"@berty-tech/grpc-bridge": [
"./packages/grpc-bridge"
],
"@berty-tech/grpc-bridge/*": [
"./packages/grpc-bridge/*"
],
"@berty-tech/messenger-app": [
"./packages/messenger-app"
],
"@berty-tech/messenger-app/*": [
"./packages/messenger-app/*"
],
"@berty-tech/music-player": [
"./packages/music-player"
],
"@berty-tech/music-player/*": [
"./packages/music-player/*"
],
"@berty-tech/navigation": [
"./packages/navigation"
],
"@berty-tech/navigation/*": [
"./packages/navigation/*"
],
"@berty-tech/store": [
"./packages/store"
],
"@berty-tech/store/*": [
"./packages/store/*"
],
"@berty-tech/styles": [
"./packages/styles"
],
"@berty-tech/styles/*": [
"./packages/styles/*"
],
"@berty-tech/web-dev-app": [
"./packages/web-dev-app"
],
"@berty-tech/web-dev-app/*": [
"./packages/web-dev-app/*"
]
"@berty-tech/*": ["./packages/*"]
}
/* 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. */
Expand Down

0 comments on commit aee1d05

Please sign in to comment.