Skip to content

Instantly share code, notes, and snippets.

@mp5maker
Created December 20, 2020 10:12
Show Gist options
  • Save mp5maker/50ece124297f508ce438fe25e054b428 to your computer and use it in GitHub Desktop.
Save mp5maker/50ece124297f508ce438fe25e054b428 to your computer and use it in GitHub Desktop.
Babel Configuration for the Expo App
const path = require("path");
const paths = {
"@web": path.join(__dirname, "..", "web-app/src"),
};
module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
plugins: [
[
"module-resolver",
{
extensions: [
".js",
".ts",
".jsx",
".tsx",
".android.js",
".ios.js",
".web.js",
],
root: ["./"],
alias: paths,
},
],
],
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment