Skip to content

Conversation

@eduardoboucas
Copy link
Member

@eduardoboucas eduardoboucas commented Oct 16, 2025

Breaks up the @netlify/edge-functions module into two:

  • @netlify/edge-functions: production runtime logic, published from the packages/edge-functions/prod directory
  • @netlify/edge-functions-dev: local development emulation logic, published from the packages/edge-functions/dev directory

Part of https://linear.app/netlify/issue/FRB-2012/separate-types-and-public-methods-from-internal-dependencies.

Performance

🚀 The @netlify/edge-functions package now has a 4000x(!) smaller install size:

  • Direct dependencies: 13 → 1
  • Total transitive dependencies: 98 → 1
  • Total install size: 32 MB → 8 KB

BREAKING CHANGE

  • The /dev export has been removed

    The local development functionality has been extracted into a new @netlify/edge-functions-dev package. If your application relies on that logic, you should npm install @netlify/edge-functions-dev and update your import:

    -import { EdgeFunctionsHandler } from "@netlify/edge-functions/dev"
    +import { EdgeFunctionsHandler } from "@netlify/edge-functions-dev"
  • The /version export has been removed

    If you want to retrieve the URL of the latest bootstrap, use the @netlify/edge-functions-bootstrap package

    -import { getURL } from "@netlify/edge-functions/version"
    +import { getURL } from "@netlify/edge-functions-bootstrap"

@eduardoboucas eduardoboucas requested review from a team as code owners October 16, 2025 12:48
Copy link
Member

@serhalp serhalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple comments

btw, looks like this will go from ~31 MB to ~88 KB 🚀

"node": ">=18.0.0"
},
"main": "./dist/node/main.js",
"exports": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loving these esm-only packages 😈

@eduardoboucas eduardoboucas requested a review from serhalp October 17, 2025 16:33
serhalp
serhalp previously approved these changes Oct 17, 2025
Copy link
Member

@serhalp serhalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️ ship it

@eduardoboucas eduardoboucas force-pushed the feat/edge-functions-split branch from 3e2306a to a77d2b3 Compare October 18, 2025 09:25
@eduardoboucas eduardoboucas merged commit ded5aef into main Oct 19, 2025
23 of 24 checks passed
@eduardoboucas eduardoboucas deleted the feat/edge-functions-split branch October 19, 2025 09:15
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.

3 participants