diff --git a/package.json b/package.json index 492eb46..d0692b8 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "scripts": { "dev": "vite", - "build": "tsc && vite build", + "build": "NODE_OPTIONS=--max-old-space-size=3072 tsc && NODE_OPTIONS=--max-old-space-size=3072 vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "lint:fix": "eslint . --fix --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "prettier": "prettier --check \"./**/*.{js,jsx,ts,tsx,css,md,json}\"", diff --git a/vite.config.ts b/vite.config.ts index 39ae59d..ad7299e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -37,8 +37,11 @@ export default defineConfig({ // navigations like SPA routes; denylist keeps real files out of the fallback. navigateFallback: 'index.html', navigateFallbackDenylist: [/\.pdf$/i], + // Large binaries in precache inflate Workbox memory during `vite build` on small VPSs. + globIgnores: ['**/*.pdf'], }, - includeAssets: ['logo.png', 'resume.pdf'], + // resume.pdf: serve from /resume.pdf; do not precache (cache quota + build RAM). + includeAssets: ['logo.png'], manifest: { name: 'Portfolio', short_name: 'Portfolio',