You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
722 B

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
reactStrictMode: true,
// 开发态隐藏左下角 Next.js / Dev Tools 指示标
devIndicators: false,
transpilePackages: [
"antd",
"@ant-design/icons",
"@ant-design/cssinjs",
"@ant-design/v5-patch-for-react-19",
],
// 缩小 antd / icons 的编译与打包面,显著降低 dev 首访 compile 时间
experimental: {
optimizePackageImports: ["antd", "@ant-design/icons"],
},
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback = {
...(config.resolve.fallback || {}),
async_hooks: false,
};
}
return config;
},
};
export default nextConfig;