diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25ce285..95b99eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,6 +83,19 @@ jobs: - name: Generate changelog run: pnpm generate-changelog + - name: Build frontend (Next.js) + shell: bash + env: + NODE_OPTIONS: ${{ matrix.platform == 'macos-latest' && matrix.target == 'aarch64-apple-darwin' && '--max-old-space-size=4096' || '--max-old-space-size=2048' }} + run: | + echo "Building Next.js frontend with NODE_OPTIONS=${NODE_OPTIONS}" + pnpm build + if [ ! -d "out" ]; then + echo "Error: Frontend build failed - 'out' directory not found" + exit 1 + fi + echo "Frontend build successful - 'out' directory exists" + - name: Build Tauri app run: | cd src-tauri @@ -92,6 +105,7 @@ jobs: shell: bash env: TAURI_PRIVATE_KEY: ${{ secrets.TAURI_UPDATER_PRIVATE_KEY }} + NODE_OPTIONS: ${{ matrix.platform == 'macos-latest' && matrix.target == 'aarch64-apple-darwin' && '--max-old-space-size=4096' || '--max-old-space-size=2048' }} run: | cd src-tauri if [ -n "$TAURI_PRIVATE_KEY" ]; then diff --git a/next.config.ts b/next.config.ts index 92710ec..56b5743 100644 --- a/next.config.ts +++ b/next.config.ts @@ -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; diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index e6fd5ce..ccac470 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -7,7 +7,7 @@ "frontendDist": "../out", "devUrl": "http://localhost:3000", "beforeDevCommand": "pnpm dev", - "beforeBuildCommand": "pnpm generate-changelog && pnpm build" + "beforeBuildCommand": "pnpm build" }, "app": { "windows": [