-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathnext.config.js
36 lines (32 loc) · 905 Bytes
/
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
const { i18n } = require("./next-i18next.config");
const withAntdLess = require("next-plugin-antd-less");
const { withSentryConfig } = require("@sentry/nextjs");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
/**
* @type {import('next').NextConfig}
*/
const moduleExports = {
i18n,
output: "standalone",
cssLoaderOptions: {
modules: true,
},
modifyVars: { "@primary-color": "#ffa62b" },
async headers() {
return [
{
source: "/fontlist.json",
headers: [{ key: "access-control-allow-origin", value: "*" }],
},
];
},
};
const sentryWebpackPluginOptions = {};
const sentrylessConfig = withAntdLess(moduleExports);
module.exports = withBundleAnalyzer(
process.env.NODE_ENV === "production"
? withSentryConfig(sentrylessConfig, sentryWebpackPluginOptions)
: sentrylessConfig,
);