Skip to content

Conversation

eduardoboucas
Copy link
Member

Summary

When the functions server is started with the loadDistFunctions parameter, which happens in the netlify serve command, we load the compiled version of functions from the .netlify/functions directory, and we actually extract the ZIP file that would be deployed to production.

This means that we don't run zip-it-and-ship-it (since the function is already built), so we can't extract metadata properties like the API version or custom routes. To address this, we're now passing to the registry the contents of the manifest file that is generated when the functions are built, so that we can extract that data.

Additionally, we were previously not considering the new entry point file when running these functions. In this PR, we're checking for its existence and only using the legacy format if the new one doesn't exist.

@eduardoboucas eduardoboucas requested a review from a team as a code owner October 17, 2023 10:51
@github-actions
Copy link

github-actions bot commented Oct 17, 2023

📊 Benchmark results

Comparing with e9e1503

  • Dependency count: 1,360 (no change)
  • Package size: 363 MB ⬇️ 0.00% decrease vs. e9e1503

@eduardoboucas eduardoboucas enabled auto-merge (squash) October 17, 2023 14:14
@eduardoboucas eduardoboucas merged commit 52f5d9f into main Oct 17, 2023
@eduardoboucas eduardoboucas deleted the feat/built-versions branch October 17, 2023 14:21
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.

2 participants