-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnext.config.js
More file actions
32 lines (29 loc) · 781 Bytes
/
next.config.js
File metadata and controls
32 lines (29 loc) · 781 Bytes
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
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
swcMinify: true,
env: {
BASE_URL: process.env.BASE_URL,
NOTION_API_KEY: process.env.NOTION_API_KEY,
NOTION_DATABSE_ID: process.env.NOTION_DATABSE_ID,
GA_TRACKING_ID: process.env.GA_TRACKING_ID,
},
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
use: ["@svgr/webpack"],
});
return config;
},
};
// module.exports = withPlugins([], nextConfig);
module.exports = () => {
const plugins = [withBundleAnalyzer];
const config = plugins.reduce((acc, next) => next(acc), {
...nextConfig,
});
return config;
};