import createNextIntlPlugin from "next-intl/plugin";

export default createNextIntlPlugin()({
    async rewrites() {
        return [
            {
                source: "/www/:path*",
                destination: `${process.env.API ?? "https://taehui.ddns.net"}/qwilight/www/:path*`
            },
        ]
    },
    async redirects() {
        return [
            {
                source: "/",
                destination: "/qwilight",
                basePath: false,
                permanent: true
            },
            {
                source: "/",
                destination: "/note",
                permanent: true
            },
        ]
    },
    basePath: "/qwilight",
});
