const withMDX = require('@next/mdx')()

/** @type {import('next').NextConfig} */
const nextConfig = {
    sassOptions: {
        includePaths: ['*'],
    },
    pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
    experimental: {
        serverComponentsExternalPackages: ['sequelize', 'sequelize-typescript', 'bcrypt', '@sequelize/core', '@/app/lib/api/error'],
        serverActions: {
            allowedOrigins: ['localhost', 'localhost:3000']
        },
    },
    webpack: (config) => {
        config.externals = [...config.externals, 'bcrypt'];
        return config;
    },
}


module.exports = withMDX(nextConfig)
