- Modified Next.js configuration to conditionally apply raw-loader for markdown files only on the client side. - Increased static page generation timeout to 300 seconds for larger builds. - Enhanced GitHub Actions release workflow by adding a step to build the Next.js frontend, ensuring the 'out' directory exists post-build. - Simplified the beforeBuildCommand in Tauri configuration to only include the build step.
31 lines
736 B
TypeScript
31 lines
736 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: 'export',
|
|
images: {
|
|
unoptimized: true,
|
|
},
|
|
webpack: (config, { isServer }) => {
|
|
// Adiciona suporte para raw-loader apenas no cliente
|
|
if (!isServer) {
|
|
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;
|