Created
April 29, 2020 20:07
-
-
Save jacobgarcia/3e088c9fd5e4c7aef43bd7ec4061eb16 to your computer and use it in GitHub Desktop.
Babel config file for Expo Init. This is helpful for having src/* folder structrue
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
const path = require("path"); | |
const paths = { | |
assets: path.resolve(__dirname, "assets"), | |
src: path.resolve(__dirname, "src"), | |
styles: path.resolve(__dirname, "styles") | |
}; | |
module.exports = function(api) { | |
api.cache(true); | |
return { | |
presets: ["babel-preset-expo"], | |
plugins: [ | |
[ | |
"module-resolver", | |
{ | |
extensions: [".js", ".jsx", ".android.js", ".ios.js", ".web.js"], | |
root: ["./src"], | |
alias: paths | |
} | |
] | |
] | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment