next.config.js 1.2 KB

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