forked from thisisqubika/react-native-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor networking layer (thisisqubika#94)
* Maintenance & refactor * Address code review comments
- Loading branch information
1 parent
3298e60
commit 20eb673
Showing
30 changed files
with
2,658 additions
and
2,109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
const alias = { '^@/(.+)': './src/\\1' }; // @/folder will be an alias to <root>/src/folder | ||
const extensions = ['.android.js', '.ios.js', '.js', '.json', '.native']; | ||
|
||
const presets = ['module:metro-react-native-babel-preset']; | ||
const plugins = [['module-resolver', { alias, extensions }], 'react-native-reanimated/plugin']; | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
plugins.unshift('transform-remove-console'); // reanimated plugin has to be listed last | ||
} | ||
|
||
module.exports = { presets, plugins }; | ||
module.exports = { | ||
presets: ['module:metro-react-native-babel-preset'], | ||
plugins: [['module-resolver', { alias, extensions }], 'react-native-reanimated/plugin'], | ||
env: { | ||
production: { | ||
plugins: ['transform-remove-console'], | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.