This PR addresses a couple of issues found with the nylas package since we've introduced both ESM and CJS support:
Add build step (script) that dynamically creates package.json files for each of the ESM and CJS modules. This prevents the To load an ES module, set "type": "module" in the package.json or use the .mjs extension error
Add ".js" file extension to all relative imports. This prevents the ERR_MODULE_NOT_FOUND error when using the SDK in an esmodule project.
License
I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.
Description
This PR addresses a couple of issues found with the nylas package since we've introduced both ESM and CJS support:
To load an ES module, set "type": "module" in the package.json or use the .mjs extension
errorERR_MODULE_NOT_FOUND
error when using the SDK in an esmodule project.License
I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.