| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import type { NextConfig } from "next";
- // import createMDX from '@next/mdx';
- import createNextIntlPlugin from 'next-intl/plugin';
- const withNextIntl = createNextIntlPlugin();
- const nextConfig: NextConfig = {
- // pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
- // output: 'export',
- distDir: './dist',
- // 防止dev模式下模拟立即卸载组件和重新挂载组件的行为
- reactStrictMode: false,
- images: {
- remotePatterns: [
- {
- protocol: 'https',
- hostname: 'usky.cn',
- pathname: '/assets/**',
- },
- ],
- },
- eslint: {
- // 忽略构建时的 ESLint 错误(第三方库可能有配置问题)
- ignoreDuringBuilds: true,
- },
- webpack: (config, { isServer }) => {
- // 确保 MediaPipe 模块在客户端正确加载
- if (!isServer) {
- config.resolve.fallback = {
- ...config.resolve.fallback,
- fs: false,
- path: false,
- crypto: false,
- };
- }
- return config;
- },
- };
- // const withMDX = createMDX({
- // // Add markdown plugins here, as desired
- // })
- // export default withMDX(withNextIntl(nextConfig));
- export default withNextIntl(nextConfig);
|