chore: update Next.js configuration and release workflow

- 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.
This commit is contained in:
Evandro Fonseca Junior committed 2025-11-28 00:20:03 -03:00
1 parent 5fdb9861ef
commit 655d9c1b45
3 files changed
+30 -6

No files matched your search

+15 -5
View File
@@ -5,16 +5,26 @@ const nextConfig: NextConfig = {
images: {
unoptimized: true,
},
webpack: (config) => {
config.module.rules.push({
test: /\.md$/,
use: 'raw-loader',
});
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;