diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular/tsconfig.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular/tsconfig.mustache index a6e9096bbf7..3ed5f2c0b10 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular/tsconfig.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular/tsconfig.mustache @@ -4,8 +4,8 @@ "experimentalDecorators": true, "noImplicitAny": false, "suppressImplicitAnyIndexErrors": true, - "target": "es5", - "module": "es6", + "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", + "module": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}commonjs{{/supportsES6}}", "moduleResolution": "node", "removeComments": true, "sourceMap": true,