-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathbabel.config.js
More file actions
36 lines (35 loc) · 1.19 KB
/
babel.config.js
File metadata and controls
36 lines (35 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
module.exports = function (api) {
api.cache(false);
return {
presets: ['babel-preset-expo'],
// exclude: ['@babel/plugin-proposal-dynamic-import'],
plugins: [
// '@babel/plugin-syntax-dynamic-import',
// '@babel/plugin-transform-modules-commonjs',
'@babel/plugin-syntax-import-assertions',
['module:react-native-dotenv', {moduleName: 'react-native-dotenv'}],
'babel-plugin-transform-typescript-metadata',
['@babel/plugin-proposal-decorators', {legacy: true}],
['@babel/plugin-proposal-class-properties', {loose: true}],
'@babel/plugin-transform-class-static-block',
[
'module-resolver',
{
alias: {
'react-native-sqlite-storage': 'react-native-nitro-sqlite',
crypto: 'react-native-quick-crypto',
stream: 'readable-stream',
buffer: '@craftzdog/react-native-buffer',
'node:events': 'events',
'node:string_decoder': 'string_decoder',
'node:url': 'url',
'typeorm': 'typeorm/browser',
'node:fs': 'expo-fs',
fs: 'expo-fs',
path: 'path-browserify',
},
},
],
],
};
};