-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathconfig-overrides.js
40 lines (39 loc) · 956 Bytes
/
config-overrides.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
const path = require("path");
const {
override,
addBabelPlugins,
babelInclude,
addWebpackAlias,
addBabelPresets,
} = require("customize-cra");
module.exports = override(
...addBabelPlugins([
"@babel/plugin-proposal-class-properties",
{
loose: true,
},
]),
...addBabelPresets([
"@babel/preset-env",
{
loose: true,
targets: {
browsers: ["> 1%", "last 2 versions"],
},
modules: "commonjs",
},
]),
babelInclude(
[
path.resolve(__dirname, "node_modules/@rneui/base"),
path.resolve(__dirname, "node_modules/@rneui/themed"),
path.resolve(__dirname, "node_modules/react-native-vector-icons"),
path.resolve(__dirname, "node_modules/react-native-ratings"),
path.resolve(__dirname, "src"),
],
addWebpackAlias({
"react-native$": "react-native-web",
"react-native-linear-gradient": "react-native-web-linear-gradient",
})
)
);