-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-overrides.js
40 lines (37 loc) · 1.11 KB
/
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 webpack = require("webpack");
const {
override,
addBabelPlugins,
babelInclude,
addWebpackAlias,
addWebpackModuleRule,
addWebpackPlugin,
addBabelPresets,
} = require("customize-cra");
const newConf = override(
...addBabelPresets("@babel/preset-react"),
...addBabelPlugins(
"@babel/plugin-proposal-class-properties",
"react-native-reanimated/plugin",
"babel-plugin-react-native-web",
"@babel/plugin-syntax-jsx"
),
babelInclude([
path.resolve(__dirname, "node_modules/react-native-gesture-handler"),
path.resolve(__dirname, "node_modules/react-native-reanimated"),
path.resolve(__dirname, "node_modules/react-native-vector-icons"),
path.resolve(__dirname, "node_modules/@motify"),
path.resolve(__dirname, "node_modules/moti"),
path.resolve(__dirname, "src"),
]),
addWebpackAlias({
"react-native": "react-native-web",
}),
addWebpackModuleRule({
test: /\.ttf$/,
loader: "url-loader", // or directly file-loader
include: path.resolve(__dirname, "node_modules/react-native-vector-icons"),
})
);
module.exports = newConf;