mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-20 22:24:28 +01:00
57 lines
1.2 KiB
TypeScript
57 lines
1.2 KiB
TypeScript
import type { NextConfig } from "next";
|
|
import createNextIntlPlugin from 'next-intl/plugin';
|
|
|
|
const nextConfig: NextConfig = {
|
|
/* config options here */
|
|
output: 'standalone',
|
|
webpack: (config) => {
|
|
config.module.rules.push({
|
|
test: /\.md$/,
|
|
use: 'raw-loader'
|
|
})
|
|
return config
|
|
},
|
|
// PWA
|
|
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'",
|
|
},
|
|
],
|
|
},
|
|
]
|
|
},
|
|
};
|
|
|
|
const withNextIntl = createNextIntlPlugin();
|
|
export default withNextIntl(nextConfig);
|