- 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.
29 lines
677 B
TypeScript
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;
|