next.config.js 399 B

123456789101112131415161718192021
  1. /** @type {import('next').NextConfig} */
  2. const withPWA = require("next-pwa")({
  3. dest: "public",
  4. });
  5. const nextConfig = {
  6. reactStrictMode: true,
  7. swcMinify: true,
  8. async rewrites() {
  9. return {
  10. fallback: [
  11. {
  12. source: "/api/:path*",
  13. destination: `https://novels.yergoo.com/api/:path*`,
  14. },
  15. ],
  16. };
  17. },
  18. };
  19. module.exports = withPWA(nextConfig);