generated from ooooorobo/react-mobile-web-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.js
45 lines (43 loc) · 1.28 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
/** @type {import('next').NextConfig} */
// eslint-disable-next-line @typescript-eslint/no-var-requires
const withAntdLess = require("next-plugin-antd-less");
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const nextConfig = {
reactStrictMode: true,
env: {
BASE_URL:
process.env.BASE_URL ||
"https://ec2-13-124-94-121.ap-northeast-2.compute.amazonaws.com:8080",
IMAGE_ENDPOINT:
process.env.IMAGE_ENDPOINT ||
"https://fork-fork-cake.s3.ap-northeast-2.amazonaws.com",
IS_DEV: process.env.NODE_ENV === "development",
KAKAO_API_KEY: process.env.KAKAO_API_KEY || "",
SITE_DOMAIN: process.env.SITE_DOMAIN || "localhost",
},
images: {
domains: [
"fork-fork-cake.s3.ap-northeast-2.amazonaws.com",
"cdn.pixabay.com",
],
minimumCacheTTL: 60,
},
};
module.exports = withAntdLess({
// modifyVars: { "@primary-color": "#fc1150" },
lessVarsFilePath: "./src/styles/variables.less",
...nextConfig,
webpack(config) {
if (process.env.ANALYZE) {
config.plugins.push(
new BundleAnalyzerPlugin({
analyzeMode: "server",
analyzerPort: 8889,
openAnalyzer: true,
}),
);
}
return config;
},
});