Skip to content

fix(site): disable Netlify edge functions in dev to prevent Deno OOM#620

Merged
decepulis merged 1 commit intomainfrom
fix/netlify-dev-deno-oom
Feb 26, 2026
Merged

fix(site): disable Netlify edge functions in dev to prevent Deno OOM#620
decepulis merged 1 commit intomainfrom
fix/netlify-dev-deno-oom

Conversation

@decepulis
Copy link
Copy Markdown
Collaborator

Fixes #588

Summary

Set NETLIFY_DEV=1 before astro dev to prevent @netlify/vite-plugin from spawning Deno workers, which intermittently crash with a fatal V8 OOM error during JSDispatchTable allocation.

Changes

  • Add NETLIFY_DEV=1 env var prefix to the site dev script
  • Add design doc covering the decision and alternatives considered
Implementation details

NETLIFY_DEV=1 is an official escape hatch in @netlify/vite-plugin — when set, the plugin's factory returns [], so no NetlifyDev instance is created and Deno is never spawned. The tradeoff is losing Netlify Image CDN, redirect emulation, and edge function emulation in dev, none of which are essential for local development.

Testing

  1. pnpm dev — site should start without Deno OOM crashes
  2. Verify the Astro dev server works normally (pages render, HMR works)

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
vjs-10-demo-react Ignored Ignored Feb 26, 2026 5:18pm

Request Review

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit da530f7
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/69a08067a6919d00081f841f
😎 Deploy Preview https://deploy-preview-620--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Package Size Diff %
@videojs/core 6.61 kB 0 B ░░░░░░░░ 0%
@videojs/element 1.60 kB 0 B ░░░░░░░░ 0%
@videojs/html 9.45 kB 0 B ░░░░░░░░ 0%
@videojs/icons 3.79 kB 0 B ░░░░░░░░ 0%
@videojs/react 16.27 kB 0 B ░░░░░░░░ 0%
@videojs/store 1.94 kB 0 B ░░░░░░░░ 0%
@videojs/utils 2.47 kB 0 B ░░░░░░░░ 0%

Total: 42.12 kB · 0 B · 0%


Entry Breakdown

Subpath sizes are the additional bytes on top of the root entry point, measured by bundling root + subpath together and subtracting the root-only size.

@videojs/core
Entry Base PR Diff %
. 3.10 kB 3.10 kB 0 B 0%
./dom 3.50 kB 3.50 kB 0 B 0%
total 6.61 kB 6.61 kB 0 B 0%
@videojs/element
Entry Base PR Diff %
. 817 B 817 B 0 B 0%
./context 823 B 823 B 0 B 0%
total 1.60 kB 1.60 kB 0 B 0%
@videojs/icons
Entry Base PR Diff %
./react 2.27 kB 2.27 kB 0 B 0%
./html 1.52 kB 1.52 kB 0 B 0%
total 3.79 kB 3.79 kB 0 B 0%
@videojs/react
Entry Base PR Diff %
. 8.50 kB 8.50 kB 0 B 0%
./audio 238 B 238 B 0 B 0%
./background 302 B 302 B 0 B 0%
./video 7.24 kB 7.24 kB 0 B 0%
total 16.27 kB 16.27 kB 0 B 0%
@videojs/store
Entry Base PR Diff %
. 1.29 kB 1.29 kB 0 B 0%
./html 468 B 468 B 0 B 0%
./react 199 B 199 B 0 B 0%
total 1.94 kB 1.94 kB 0 B 0%
@videojs/utils
Entry Base PR Diff %
./array 104 B 104 B 0 B 0%
./dom 684 B 684 B 0 B 0%
./events 227 B 227 B 0 B 0%
./function 197 B 197 B 0 B 0%
./object 119 B 119 B 0 B 0%
./predicate 265 B 265 B 0 B 0%
./string 110 B 110 B 0 B 0%
./style 185 B 185 B 0 B 0%
./time 478 B 478 B 0 B 0%
./number 158 B 158 B 0 B 0%
total 2.47 kB 2.47 kB 0 B 0%

ℹ️ How to interpret

Sizes are minified + brotli, measured with esbuild.
Package totals are computed as root size + marginal subpath costs.
Subpath marginal cost = (root + subpath bundled together) − root alone.

Icon Meaning
No change
🔺 Increased ≤ 10%
🔴 Increased > 10%
🔽 Decreased
🆕 New (no baseline)

Run pnpm size locally to check current sizes.

@decepulis decepulis merged commit 4efb94c into main Feb 26, 2026
11 of 12 checks passed
@decepulis decepulis deleted the fix/netlify-dev-deno-oom branch February 26, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dev server crashes with Deno OOM in Netlify edge functions

1 participant