/** @type {import('next').NextConfig} */
const withPWA = require("next-pwa")({
  dest: "public",
});

const nextConfig = {
  reactStrictMode: true,
  swcMinify: true,
  async rewrites() {
    return {
      fallback: [
        {
          source: "/api/:path*",
          destination: `https://novels.yergoo.com/api/:path*`,
        },
      ],
    };
  },
};

module.exports = withPWA(nextConfig);
