Files
notesnook/apps/mobile/babel.config.js
Abdullah Atta 3de225f7c9 mobile: upgrade react native 0.82
this commit also bump app version to 3.3.10-beta.0
2025-11-27 11:32:50 +05:00

31 lines
701 B
JavaScript

let PROCESS_ENV = process.env.BABEL_ENV || process.env.NODE_ENV;
/**
* @type {import('@babel/core').ConfigFunction}
*/
module.exports = function (api, opts) {
if (!PROCESS_ENV) PROCESS_ENV = "production";
const env = {
presets: ["module:@react-native/babel-preset"],
plugins: [
"@babel/plugin-transform-named-capturing-groups-regex",
"@babel/plugin-transform-export-namespace-from"
]
};
if (env === "production") {
env.plugins.push("transform-remove-console");
}
if (env === "test") {
env.overrides.push({
test: "../node_modules/jest-runner"
});
}
env.plugins.push("react-native-reanimated/plugin");
api.cache(true);
return env;
};