🔨 chore: improve build process (#9227)

* update

* update
This commit is contained in:
Arvin Xu
2025-09-12 19:11:42 +08:00
committed by GitHub
parent cf0272cc1b
commit c38079d36f
2 changed files with 10 additions and 3 deletions
+8 -1
View File
@@ -26,6 +26,9 @@ const nextConfig: NextConfig = {
emotion: true,
},
compress: isProd,
eslint: {
ignoreDuringBuilds: true,
},
experimental: {
optimizePackageImports: [
'emoji-mart',
@@ -195,6 +198,7 @@ const nextConfig: NextConfig = {
},
},
reactStrictMode: true,
redirects: async () => [
{
destination: '/sitemap-index.xml',
@@ -264,10 +268,13 @@ const nextConfig: NextConfig = {
source: '/repos',
},
],
// when external packages in dev mode with turbopack, this config will lead to bundle error
serverExternalPackages: isProd ? ['@electric-sql/pglite'] : undefined,
transpilePackages: ['pdfjs-dist', 'mermaid'],
typescript: {
ignoreBuildErrors: true,
},
webpack(config) {
config.experiments = {
+2 -2
View File
@@ -29,14 +29,14 @@
"packages/*"
],
"scripts": {
"prebuild": "tsx scripts/prebuild.mts",
"prebuild": "tsx scripts/prebuild.mts && npm run lint",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=6144 next build",
"postbuild": "npm run build-sitemap && npm run build-migrate-db",
"build-migrate-db": "bun run db:migrate",
"build-sitemap": "tsx ./scripts/buildSitemapIndex/index.ts",
"build:analyze": "NODE_OPTIONS=--max-old-space-size=6144 ANALYZE=true next build",
"build:docker": "npm run prebuild && NODE_OPTIONS=--max-old-space-size=6144 DOCKER=true next build && npm run build-sitemap",
"prebuild:electron": "cross-env NEXT_PUBLIC_IS_DESKTOP_APP=1 tsx scripts/prebuild.mts",
"prebuild:electron": "cross-env NEXT_PUBLIC_IS_DESKTOP_APP=1 tsx scripts/prebuild.mts && npm run lint",
"build:electron": "cross-env NODE_OPTIONS=--max-old-space-size=6144 NEXT_PUBLIC_IS_DESKTOP_APP=1 NEXT_PUBLIC_SERVICE_MODE=server next build",
"clean:node_modules": "bash -lc 'set -e; echo \"Removing all node_modules...\"; rm -rf node_modules; pnpm -r exec rm -rf node_modules; rm -rf apps/desktop/node_modules; echo \"All node_modules removed.\"'",
"db:generate": "drizzle-kit generate && npm run db:generate-client && npm run workflow:dbml",