-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbabel.config.js
More file actions
22 lines (17 loc) · 587 Bytes
/
Copy pathbabel.config.js
File metadata and controls
22 lines (17 loc) · 587 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const path = require('node:path');
const { getConfig } = require('react-native-builder-bob/babel-config');
const pkg = require('../package.json');
const root = path.resolve(__dirname, '..');
module.exports = (api) => {
api.cache(true);
const config = getConfig(
{
presets: ['babel-preset-expo'],
},
{ root, pkg }
);
// React Compiler must run before other transforms. React 19 ships its own
// runtime, so no `react-compiler-runtime` package is required.
config.plugins = ['babel-plugin-react-compiler', ...(config.plugins ?? [])];
return config;
};