From de2c042482741dc23f7d975458a1fba95863de53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 2 May 2020 00:32:05 +0200 Subject: BREAKING: remove support for JSON imports (#5037) This commit removes support for importing JSON files as modules. This change is dictated by security; browsers rolled back on this support as well. --- cli/js/compiler/sourcefile.ts | 5 ----- 1 file changed, 5 deletions(-) (limited to 'cli/js/compiler/sourcefile.ts') diff --git a/cli/js/compiler/sourcefile.ts b/cli/js/compiler/sourcefile.ts index a55de080b..3d547551f 100644 --- a/cli/js/compiler/sourcefile.ts +++ b/cli/js/compiler/sourcefile.ts @@ -34,11 +34,6 @@ function getExtension(fileName: string, mediaType: MediaType): ts.Extension { return fileName.endsWith(".d.ts") ? ts.Extension.Dts : ts.Extension.Ts; case MediaType.TSX: return ts.Extension.Tsx; - case MediaType.Json: - // we internally compile JSON, so what gets provided to the TypeScript - // compiler is an ES module, but in order to get TypeScript to handle it - // properly we have to pretend it is TS. - return ts.Extension.Ts; case MediaType.Wasm: // Custom marker for Wasm type. return ts.Extension.Js; -- cgit v1.2.3