Skip to content

Instantly share code, notes, and snippets.

@jacobgarcia
Created April 29, 2020 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacobgarcia/3e088c9fd5e4c7aef43bd7ec4061eb16 to your computer and use it in GitHub Desktop.
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
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