Fix server build: use pnpm exec instead of pnpx, remove firebase-admin from externals

- pnpx acts as pnpm dlx, downloading latest prisma v7 from npm instead of
  using locally installed v6.3.1. Switch to pnpm exec for local execution.
- Remove firebase-admin from webpack externals since externals prevents
  NormalModuleReplacementPlugin from intercepting the imports. The plugin
  regex now properly catches all firebase-admin/* paths and redirects to stub.
This commit is contained in:
2026-02-24 04:04:14 -08:00
parent 35f7d5fcf3
commit a6e451a336
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -74,8 +74,7 @@ module.exports = (phase, { defaultConfig }) => {
},
webpack: (config, { isServer, dev }) => {
config.cache = false; // Disable Webpack's persistent caching
config.externals.push("pino-pretty", "lokijs", "encoding",
"firebase-admin", "firebase-admin/app", "firebase-admin/auth", "firebase-admin/firestore");
config.externals.push("pino-pretty", "lokijs", "encoding");
config.resolve.fallback = { fs: false, net: false, tls: false };
config.resolve.alias['@'] = path.resolve(__dirname, 'src');
+2 -2
View File
@@ -14,8 +14,8 @@
"tc": "tsc",
"typecheck": "tsc",
"clean": "rm -rf ./node_modules",
"prisma:gen": "pnpx prisma generate",
"build": "pnpx prisma generate && tsc && tsc-alias",
"prisma:gen": "pnpm exec prisma generate",
"build": "pnpm exec prisma generate && tsc && tsc-alias",
"start": "node dist/server.js",
"lint": "eslint src/**/*.ts",
"format": "eslint src/**/*.ts --fix",