Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix typescript with cjs compile issue (#802)
When I tried to run examples with some versions of typescript, some versions(version< 5.3) failed to compile. The main reason is line-bot-sdk-nodejs's compilerOption is wrong. To provide dual package, we need to use `"module": "ESNext"` and `"moduleResolution": "Bundler"`. We used `NodeNext` but we should not because this repository will support others not only Node.js. Otherwise, TypeScript will explicitly write a resolution-mode to the type definition files. (like `/// <reference types="node" resolution-mode="require"/>`) Although it should normally be written, there needs to be a way to turn this off when supporting dual packages. In addition, this change upgrades `target` from ES2018 to ES2022. Node.js v18 supports ES2022. ref: https:/microsoft/TypeScript/wiki/Node-Target-Mapping Co-authored-by: Tokuhiro Matsuno <[email protected]>
- Loading branch information