next.config.js 1.4 KB

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