assistant-todo/next.config.mjs

28 lines
1002 B
JavaScript
Raw Normal View History

2024-03-09 22:17:44 -05:00
/** @type {import('next').NextConfig} */
2025-08-22 07:12:39 -04:00
const isProduction = process.env.NODE_ENV === 'production'
2024-05-06 01:57:58 -04:00
const nextConfig = {
2025-08-22 07:12:39 -04:00
// 核心配置:构建前清空输出目录
cleanDistDir: true,
basePath: isProduction ? "/todo" : '',
// 静态文件前缀
2025-09-11 07:05:24 -04:00
assetPrefix: isProduction ? "/todo/" : '',
2024-05-28 06:54:58 -04:00
// Middleware cannot be used with "output: export".
output: 'export',
2024-05-08 02:15:59 -04:00
// Optional: Change links `/me` -> `/me/` and emit `/me.html` -> `/me/index.html`
// trailingSlash: true,
// Optional: Prevent automatic `/me` -> `/me/`, instead preserve `href`
// skipTrailingSlashRedirect: true,
// Optional: Change the output directory `out` -> `dist`
2025-08-22 07:12:39 -04:00
distDir: 'docker/outd',
2025-03-19 06:59:45 -04:00
// 严格模式下react-beautiful-dnd无法使用
reactStrictMode:false,
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
2025-08-22 07:12:39 -04:00
ignoreDuringBuilds: true,
},
2024-05-06 01:57:58 -04:00
};
2024-03-09 22:17:44 -05:00
export default nextConfig;