Upcoming change to JavaScript Functions deployment: Try it today for faster functions and new ECMAScript features

During the week of May 17, we’ll be changing how we bundle JavaScript serverless functions for deployment. Under the hood, we’ll be using a tool called esbuild, which enables:

There are some edge cases, particularly around functions that depend on modules with native addons, that work differently with the new bundler. While we work on identifying these edge cases and automating ways to handle them, we’re opening the ability to beta-test the new bundler now. You’ll get to take advantage of the features above, and we’ll get more chances to find edge cases. win-win!

To find out more about the bundler and how to enable it on your site, visit our blog post and docs:

We’d love to hear how it works for you!

4 Likes

Fantastic! Really looking forward to this one :nerd_face:

1 Like

cool, looks like it’s working great for my little app. And, will you all be updating the netlify dev command to support this locally?

@ivanoats Hello!!

Glad to hear it’s working for you. We are definitely planning to mirror this functionality in netlify dev.

1 Like

@ivanoats Update complete! Netlify CLI 3.17.0 now bundles JS functions (respecting the configured node_bundler) before serving them with netlify dev.

For anyone who doesn’t know, you can get the latest version of Netlify CLI by running the following command in your terminal:

npm install -g netlify-cli

Updating to say that we will not be switching the default bundler for JavaScript Netlify Functions this week. We’d like to get more user feedback and keep developing fallbacks for edge cases.

In the meantime, you can still take advantage of faster functions bundling anytime by adding the following to your Netlify configuration file:

[functions]
  node_bundler = "esbuild"

(Also note that TypeScript functions will continue to deploy automatically with the esbuild bundler.)

Give the new bundler a try with your JavaScript serverless functions and let us know how it goes!

1 Like