web-humas-fe/next.config.js

71 lines
1.4 KiB
JavaScript
Raw Normal View History

2025-04-16 08:51:12 +00:00
// next.config.js
2025-04-24 09:26:01 +00:00
// const withPWA = require("next-pwa")({
// dest: "public",
// register: true,
// skipWaiting: true,
// // disable: process.env.NODE_ENV === "development", // disable PWA di mode dev
// });
2025-04-16 08:51:12 +00:00
2024-01-05 06:57:30 +00:00
/** @type {import('next').NextConfig} */
2024-03-08 03:28:18 +00:00
const nextConfig = {
2025-04-24 09:26:01 +00:00
async headers() {
return [
{
source: "/(.*)",
headers: [
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "X-Frame-Options",
value: "DENY",
},
{
key: "Referrer-Policy",
value: "strict-origin-when-cross-origin",
},
],
},
{
source: "/sw.js",
headers: [
{
key: "Content-Type",
value: "application/javascript; charset=utf-8",
},
{
key: "Cache-Control",
value: "no-cache, no-store, must-revalidate",
},
{
key: "Content-Security-Policy",
value: "default-src 'self'; script-src 'self'",
},
],
},
];
},
eslint: {
ignoreDuringBuilds: true,
},
2025-03-14 08:45:40 +00:00
experimental: {
serverActions: true,
2025-04-24 09:26:01 +00:00
pwa: {
dest: "public",
register: true,
skipWaiting: true,
},
2025-03-14 08:45:40 +00:00
},
images: {
remotePatterns: [
{
hostname: "*",
},
],
},
};
2024-01-05 06:57:30 +00:00
2025-04-24 09:26:01 +00:00
// module.exports = withPWA(nextConfig);
module.exports = nextConfig;