nats.ws should support ECMA Script module ES2017 and later
Use case
I have integrated nats.ws with Angular 12. When I set the target to ES2017 or later in tsconfig, it throws an error. Using a lower version of ES modules may prevent fully leveraging the latest ECMAScript features, potentially resulting in less efficient performance optimizations and limited utilization of new features.
./node_modules/nats.ws/esm/nats.js:7472:16 - Error: Module parse failed: Unexpected token (7472:16)
File was processed with these loaders:
./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js
./node_modules/@ngtools/webpack/src/ivy/index.js
You may need an additional loader to handle the result of these loaders.
| _asyncToGenerator(function* () {
| try {
for await (const b of _this12.transport) {
| _this12.parser.parse(b);
| }
Proposed change
nats.ws should support ECMA Script module ES2017 and later
Use case
I have integrated nats.ws with Angular 12. When I set the target to ES2017 or later in tsconfig, it throws an error. Using a lower version of ES modules may prevent fully leveraging the latest ECMAScript features, potentially resulting in less efficient performance optimizations and limited utilization of new features.
Contribution
No response