From 524f162e6346134480c6b302012015327c06b7e7 Mon Sep 17 00:00:00 2001 From: Tobias Wich Date: Mon, 22 Jan 2018 06:40:20 +0100 Subject: [PATCH] Use supportsES6 flag in ts compilation for language typescript-angular (#7408) --- .../src/main/resources/typescript-angular/tsconfig.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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,