googleapis / google-api-nodejs-client

Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
https://googleapis.dev/nodejs/googleapis/latest/
Apache License 2.0
11.38k stars 1.91k forks source link

Provide an ESM output target #3335

Open cramforce opened 1 year ago

cramforce commented 1 year ago

Currently this project is written in (generates) TypeScript using esm module notation but generates CJS output.

This makes applying size optimizations to the code essentially impossible. While this package is supposed to be used on the server side, there are environments that care about impact of a module on startup time such as serverless environments and CLIs. Measured on my Macbook M1, requiring this packages currently takes about 650ms.