-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbabel.config.js
51 lines (50 loc) · 1.47 KB
/
babel.config.js
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/** @type {import('@babel/core').TransformOptions['plugins']} */
const plugins = [
[
/** Enables baseUrl: "./" option in tsconfig.json to work @see https://github.com/entwicklerstube/babel-plugin-root-import */
"babel-plugin-root-import",
{
paths: [
{
rootPathPrefix: "app/",
rootPathSuffix: "app",
},
{
rootPathPrefix: "assets/",
rootPathSuffix: "assets",
},
],
},
],
[
"module-resolver",
{
extensions: [
'.js',
'.jsx',
'.ts',
'.tsx',
'.android.js',
'.android.tsx',
'.ios.js',
'.ios.tsx',
],
},
],
["@babel/plugin-transform-flow-strip-types"],
["@babel/plugin-proposal-decorators", { legacy: true, loose: true }],
/** react-native-reanimated web support @see https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/#web */
"@babel/plugin-proposal-export-namespace-from",
["@babel/plugin-proposal-private-methods", {loose: true}],
/** NOTE: This must be last in the plugins @see https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/#babel-plugin */
"react-native-reanimated/plugin",
]
/** @type {import('@babel/core').TransformOptions} */
module.exports = {
presets: ["babel-preset-expo"],
env: {
production: {},
test: {"plugins": ["@babel/plugin-transform-modules-commonjs"]},
},
plugins,
}