web-humas-fe/next.config.js

81 lines
1.7 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} */
2025-05-16 09:28:35 +00:00
const path = require("path");
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-05-17 17:54:55 +00:00
// experimental: {
// serverActions: true,
// pwa: {
// dest: "public",
// register: true,
// skipWaiting: true,
// },
// },
images: {
remotePatterns: [
{
hostname: "*",
},
],
},
2025-05-16 09:28:35 +00:00
webpack: (config) => {
config.resolve.alias["ckeditor5-custom-build"] = path.resolve(
__dirname,
"vendor/ckeditor5"
);
return config;
},
};
2024-01-05 06:57:30 +00:00
2025-04-24 09:26:01 +00:00
// module.exports = withPWA(nextConfig);
module.exports = nextConfig;