-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
30 lines (27 loc) · 682 Bytes
/
Copy pathnext.config.mjs
File metadata and controls
30 lines (27 loc) · 682 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
import {
PHASE_DEVELOPMENT_SERVER,
PHASE_PRODUCTION_BUILD,
} from "next/constants.js";
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: "https",
hostname: "img.freepik.com/**",
},
],
},
output: 'export', // Enable static export :)
};
const nextConfigFunction = async (phase) => {
if (phase === PHASE_DEVELOPMENT_SERVER || phase === PHASE_PRODUCTION_BUILD) {
const withPWA = (await import("@ducanh2912/next-pwa")).default({
dest: "public",
});
return withPWA(nextConfig);
}
return nextConfig;
};
export default nextConfigFunction;