import path from 'path' /** @type {import('next').NextConfig} */ const nextConfig = { pageExtensions: ['ts', 'tsx', 'mdx'], webpack(config) { // @ 绝对路径指向根目录 config.resolve.alias['@'] = path.resolve(process.cwd()) return config } } export default nextConfig