diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index f102983979ff..256f9a8f3119 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -25,14 +25,14 @@ }, "peerDependencies": { "@angular/compiler-cli": "^12.0.0 || ^12.1.0-next", - "typescript": "~4.2.3", + "typescript": "~4.2.3 || ~4.3.2", "webpack": "^5.30.0" }, "devDependencies": { "@angular-devkit/core": "0.0.0", "@angular/compiler": "12.0.4", "@angular/compiler-cli": "12.0.4", - "typescript": "4.2.4", + "typescript": "4.3.2", "webpack": "5.38.1" } } diff --git a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts index 84ed2ae384f7..1c340e2a69fd 100644 --- a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts +++ b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts @@ -16,7 +16,7 @@ function transform( shouldTransform = true, directTemplateLoading = true, importHelpers = true, - module: ts.ModuleKind = ts.ModuleKind.ESNext, + module: ts.ModuleKind = ts.ModuleKind.ES2020, inlineStyleMimeType?: string, ) { const { program, compilerHost } = createTypescriptContext(input, undefined, undefined, { diff --git a/packages/ngtools/webpack/src/transformers/spec_helpers.ts b/packages/ngtools/webpack/src/transformers/spec_helpers.ts index 7ca76475657c..9fea6da3b10b 100644 --- a/packages/ngtools/webpack/src/transformers/spec_helpers.ts +++ b/packages/ngtools/webpack/src/transformers/spec_helpers.ts @@ -26,8 +26,8 @@ export function createTypescriptContext( allowJs: true, newLine: ts.NewLineKind.LineFeed, moduleResolution: ts.ModuleResolutionKind.NodeJs, - module: ts.ModuleKind.ESNext, - target: ts.ScriptTarget.ESNext, + module: ts.ModuleKind.ES2020, + target: ts.ScriptTarget.ES2020, skipLibCheck: true, sourceMap: false, importHelpers: true, diff --git a/yarn.lock b/yarn.lock index 013d8daee6e4..a83a7770fbaa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -86,7 +86,7 @@ "@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#941d67490391ab1a385796fd34e588f7416e3ebb": version "0.0.0" - resolved "https://github.com/angular/dev-infra-private-builds.git#b945d698497fe2d412f209641cf69fde54276f5d" + resolved "https://github.com/angular/dev-infra-private-builds.git#7308e71916da94b51a9b558693c49a04bfc98beb" dependencies: "@angular/benchpress" "0.2.1" "@bazel/buildifier" "^4.0.1" @@ -11781,7 +11781,7 @@ typescript@4.2.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== -typescript@~4.3.2: +typescript@4.3.2, typescript@~4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==