-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.mjs
More file actions
41 lines (36 loc) · 984 Bytes
/
next.config.mjs
File metadata and controls
41 lines (36 loc) · 984 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
33
34
35
36
37
38
39
40
41
import withFlowbiteReact from "flowbite-react/plugin/nextjs";
// @ts-check
// include prototype pages in non-production builds
const default_page_ext = ["ts", "tsx", "js", "jsx", "mdx", "md"];
const page_ext =
process.env.NODE_ENV === "production"
? [...default_page_ext]
: ["proto.tsx", "proto.js", ...default_page_ext];
// we're unlikely to use ts or jsx for pages
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
logging: {
fetches: {
fullUrl: true,
},
},
compiler: {
// Remove console logs in production
removeConsole: process.env.NODE_ENV === "production",
},
// include/exclude prototype pages for different type of builds
pageExtensions: page_ext,
// Allow external images from GitHub avatars
images: {
remotePatterns: [
{
protocol: "https",
hostname: "avatars.githubusercontent.com",
pathname: "/u/*",
},
],
},
};
export default withFlowbiteReact(nextConfig);