Files
OllaHub/next.config.ts
T
Evandro Fonseca Junior 55749c07e3 chore: refine Next.js configuration and improve error handling
- Simplified the Next.js webpack configuration to apply raw-loader for markdown files universally.
- Updated build script in package.json to ensure webpack is used during the build process.
- Enhanced error logging across various hooks to provide clearer messages when exceptions occur, improving debugging capabilities.
2025-11-28 00:38:58 -03:00

29 lines
677 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: 'export',
images: {
unoptimized: true,
},
webpack: (config) => {
// Adiciona suporte para raw-loader para arquivos .md
config.module.rules.push({
test: /\.md$/,
use: {
loader: 'raw-loader',
options: {
esModule: false,
},
},
});
return config;
},
// Configuração Turbopack: objeto vazio silencia o erro
// Turbopack ainda não suporta raw-loader, então usaremos webpack para builds
turbopack: {},
// Aumenta timeout para builds grandes
staticPageGenerationTimeout: 300,
};
export default nextConfig;