28 lines
1002 B
JavaScript
28 lines
1002 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const isProduction = process.env.NODE_ENV === 'production'
|
|
const nextConfig = {
|
|
// 核心配置:构建前清空输出目录
|
|
cleanDistDir: true,
|
|
basePath: isProduction ? "/todo" : '',
|
|
// 静态文件前缀
|
|
assetPrefix: isProduction ? "/todo/" : '',
|
|
// Middleware cannot be used with "output: export".
|
|
output: 'export',
|
|
// 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`
|
|
distDir: 'docker/outd',
|
|
// 严格模式下react-beautiful-dnd无法使用
|
|
reactStrictMode:false,
|
|
eslint: {
|
|
// Warning: This allows production builds to successfully complete even if
|
|
// your project has ESLint errors.
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|