// @ts-check
const grabDist = require("./utils/grabDist");
const distDir = grabDist();

const NEXT_PUBLIC_SU_ADMIN_ORIGIN =
    process.env.NEXT_PUBLIC_DSQL_SU_ADMIN_ORIGIN || "";

console.log(distDir);

/** @type {import('next-sitemap').IConfig} */
module.exports = {
    siteUrl: process.env.DSQL_SITE_URL || "https://datasquirel.com",
    generateRobotsTxt: true,
    sourceDir: distDir,
    exclude: [
        "/admin*",
        "/redirect",
        `${NEXT_PUBLIC_SU_ADMIN_ORIGIN}*`,
        "/*password*",
    ],
};
