Skip to content

Conversation

@eduardoboucas
Copy link
Member

- Summary

Since #2094, netlify dev is serving functions after bundling them with zip-it-and-ship-it. To contain the risks of that change, we enable it only when we detect that users have opted in to esbuild via the functions.node_bundler configuration property.

However, we treat TypeScript support as GA, with no correlation with the opt-in mechanism to the beta feature that node_bundler provides. This means that someone who wants to continue to use the legacy bundler for JavaScript functions but also include a TypeScript function will not be able to access the TypeScript function locally, since CLI will serve the raw file.

This PR changes the condition used by the zisi function builder, so that it's enable if node_bundler is esbuild or there's at least one TypeScript function in the functions directory.

- Test plan

New test added.

- A picture of a cute animal (not mandatory but encouraged)

foca

@eduardoboucas eduardoboucas added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Apr 17, 2021
@eduardoboucas eduardoboucas requested a review from a team as a code owner April 17, 2021 13:28
@eduardoboucas eduardoboucas requested a review from erezrokah April 17, 2021 13:57
@eduardoboucas eduardoboucas merged commit 845cd04 into main Apr 19, 2021
@eduardoboucas eduardoboucas deleted the feat/typescript-bundle branch April 19, 2021 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature code contributing to the implementation of a feature and/or user facing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants