forked from gmx-io/gmx-interface
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config-overrides.js
42 lines (36 loc) · 987 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
41
42
const webpack = require("webpack");
function override(config) {
// https://github.com/lingui/js-lingui/issues/1195
// Adding loader to use for .po files to webpack
const loaders = config.module.rules.find((rule) => Array.isArray(rule.oneOf));
loaders.oneOf.splice(loaders.length - 1, 0, {
test: /\.po/,
use: [
{
loader: "@lingui/loader",
},
],
});
config.resolve.fallback = {
os: false,
http: false,
https: false,
stream: false,
crypto: false,
};
config.plugins = (config.plugins || []).concat([
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"],
}),
]);
return config;
}
override.jest = function (config) {
config.transform = {
"node_modules/multiformats/(basics|block|cid)$": "react-app-rewired/scripts/utils/babelTransform",
...config.transform,
};
config.transformIgnorePatterns = ["node_modules/(?!multiformats|wagmi)/"];
return config;
};
module.exports = override;