text: /* eslint-disable @typescript-eslint/no-var-requires */
  const withPWA = require("next-pwa");
  const CopyPlugin = require("copy-webpack-plugin");
  
  /** @type {import('next').NextConfig} */
  module.exports = withPWA({
    pwa: {
      disable: process.env.NODE_ENV === "development",
      // process.env.NODE_ENV === "preview" ||
      // process.env.NODE_ENV === "production",
      // delete two lines above to enable PWA in production deployment
      // add your own icons to public/manifest.json
      // to re-generate manifest.json, you can visit https://tomitm.github.io/appmanifest/
      dest: "public",
      register: true,
    },
    reactStrictMode: true,
    publicRuntimeConfig: {
      env: {
        GITHUB_REPO: process.env["GITHUB_REPO"],
      },
    },
    webpack: (config, { dev }) => {
      // if (!dev) {
      //   config.plugins.push(
      //     new CopyPlugin({
      //       patterns: [
      //         {
      //           from: "db",
      //           to: "db",
      //         },
      //       ],
      //     })
      //   );
      // }
      return config;
    },
  });
  