From 33eea0400d6b72d84c8fe80d1fbf9f02723187fb Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sun, 7 Mar 2021 20:40:11 +0000 Subject: fix(cli/ast): Pass importsNotUsedAsValues to swc (#9714) Fixes #9709 --- cli/module_graph.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cli/module_graph.rs') diff --git a/cli/module_graph.rs b/cli/module_graph.rs index 8a3c140ba..ad6d01589 100644 --- a/cli/module_graph.rs +++ b/cli/module_graph.rs @@ -773,6 +773,7 @@ impl Graph { let mut ts_config = TsConfig::new(json!({ "checkJs": false, "emitDecoratorMetadata": false, + "importsNotUsedAsValues": "remove", "inlineSourceMap": true, "jsx": "react", "jsxFactory": "React.createElement", @@ -814,6 +815,7 @@ impl Graph { // TODO(@kitsonk) consider enabling this by default // see: https://github.com/denoland/deno/issues/7732 "emitDecoratorMetadata": false, + "importsNotUsedAsValues": "remove", "inlineSourceMap": true, "outDir": "deno://", "removeComments": true, @@ -942,6 +944,7 @@ impl Graph { "emitDecoratorMetadata": false, "esModuleInterop": true, "experimentalDecorators": true, + "importsNotUsedAsValues": "remove", "inlineSourceMap": false, "isolatedModules": true, "jsx": "react", @@ -1589,6 +1592,7 @@ impl Graph { let mut ts_config = TsConfig::new(json!({ "checkJs": false, "emitDecoratorMetadata": false, + "importsNotUsedAsValues": "remove", "inlineSourceMap": true, "jsx": "react", "jsxFactory": "React.createElement", -- cgit v1.2.3