next.config.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. const config = {
  2. experimental: {
  3. useCache: true,
  4. reactCompiler: true,
  5. },
  6. reactStrictMode: true,
  7. pageExtensions: ["ts", "tsx", "mdx"],
  8. logging: {
  9. fetches: {
  10. fullUrl: true,
  11. },
  12. },
  13. turbopack: {
  14. rules: {
  15. "*.svg": {
  16. loaders: ["@svgr/webpack"],
  17. as: "*.js",
  18. },
  19. },
  20. },
  21. webpack(config) {
  22. config.module.rules.push({
  23. test: /\.svg$/i,
  24. use: ["@svgr/webpack"],
  25. });
  26. return config;
  27. },
  28. headers: async () => [
  29. {
  30. source: "/:path*",
  31. headers: [
  32. {
  33. key: "X-XSS-Protection",
  34. value: "1; mode=block",
  35. },
  36. {
  37. key: "Referrer-Policy",
  38. value: "strict-origin-when-cross-origin",
  39. },
  40. {
  41. key: "Strict-Transport-Security",
  42. value: "max-age=2592000",
  43. },
  44. {
  45. key: "X-Content-Type-Options",
  46. value: "nosniff",
  47. },
  48. {
  49. key: "Permissions-Policy",
  50. value:
  51. "vibrate=(), geolocation=(), midi=(), notifications=(), push=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), speaker=(), vibrate=(), fullscreen=self",
  52. },
  53. ],
  54. },
  55. ],
  56. };
  57. export default config;