-
Notifications
You must be signed in to change notification settings - Fork 51
/
next.config.js
64 lines (58 loc) · 2.18 KB
/
next.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
52
53
54
55
56
57
58
59
60
61
62
63
64
// This file sets a custom webpack configuration to use your Next.js app
// with Sentry.
// https://nextjs.org/docs/api-reference/next.config.js/introduction
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
const { withSentryConfig } = require("@sentry/nextjs");
const path = require("path");
const { I18NextHMRPlugin } = require("i18next-hmr/plugin");
const { i18n } = require("./next-i18next.config");
const localesDir = path.resolve("public/locales");
// To run `yarn analyze` uncomment the respective lines:
// const withBundleAnalyzer = require("@next/bundle-analyzer")({
// enabled: process.env.ANALYZE === "true",
// });
/** @type {import('next').NextConfig} */
const moduleExports = {
typescript: {
ignoreBuildErrors: true,
},
env: {
infura: "https://cloudflare-eth.com/",
ethRPC: "https://cloudflare-eth.com/",
polygonRPC: "https://polygon-rpc.com",
Fortmatic: "pk_live_3754096A894BEFE4",
Portis: "8f879477-6443-4f75-8e94-b44aee86a9f7",
// apiChain: "https://api.pickle.finance/prod/protocol/analytics/chain",
// apiHost: "https://api.pickle.finance/prod",
// apiJar: "https://api.pickle.finance/prod/protocol/analytics/jar",
// apiPlatform: "https://api.pickle.finance/prod/protocol/analytics/platform/en",
apiChain: "https://f8wgg18t1h.execute-api.us-west-1.amazonaws.com/prod/protocol/analytics/chain",
apiHost: "https://f8wgg18t1h.execute-api.us-west-1.amazonaws.com/prod",
apiJar: "https://f8wgg18t1h.execute-api.us-west-1.amazonaws.com/prod/protocol/analytics/jar",
apiPlatform: "https://f8wgg18t1h.execute-api.us-west-1.amazonaws.com/prod/protocol/analytics/platform/en",
},
i18n,
async rewrites() {
return [
{
source: "/jars",
destination: "/farms",
},
];
},
// webpack5: true,
webpack(config, context) {
if (!context.isServer && context.dev) {
config.plugins.push(new I18NextHMRPlugin({ localesDir }));
}
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
};
return config;
},
reactStrictMode: true,
};
const SentryWebpackPluginOptions = {};
// module.exports = withBundleAnalyzer(moduleExports);
module.exports = moduleExports;