diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-10-23 11:38:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-23 12:38:35 +0200 |
commit | a3024a6dc5c27317049a39ad8cb3e54368429dbf (patch) | |
tree | 118d2c24912410eaf6a712e0e786b0f9bd634333 | |
parent | f56c7868ab3f862fc66c8605ed34c315040cb3a2 (diff) |
BREAKING(cli/tsc): Enable isolatedModules by default (#8050)
-rw-r--r-- | cli/module_graph2.rs | 5 | ||||
-rw-r--r-- | cli/tsc.rs | 3 | ||||
-rw-r--r-- | cli/tsc_config.rs | 1 |
3 files changed, 3 insertions, 6 deletions
diff --git a/cli/module_graph2.rs b/cli/module_graph2.rs index 678fe8da5..4895cc53a 100644 --- a/cli/module_graph2.rs +++ b/cli/module_graph2.rs @@ -698,9 +698,6 @@ impl Graph2 { options: CheckOptions, ) -> Result<(Stats, Diagnostics, Option<IgnoredCompilerOptions>), AnyError> { - // TODO(@kitsonk) set to `true` in followup PR - let unstable = options.lib == TypeLib::UnstableDenoWindow - || options.lib == TypeLib::UnstableDenoWorker; let mut config = TsConfig::new(json!({ "allowJs": true, // TODO(@kitsonk) is this really needed? @@ -708,7 +705,7 @@ impl Graph2 { // Enabled by default to align to transpile/swc defaults "experimentalDecorators": true, "incremental": true, - "isolatedModules": unstable, + "isolatedModules": true, "lib": options.lib, "module": "esnext", "strict": true, diff --git a/cli/tsc.rs b/cli/tsc.rs index 4cf253b7c..dfd733d48 100644 --- a/cli/tsc.rs +++ b/cli/tsc.rs @@ -716,8 +716,7 @@ pub async fn runtime_compile( "allowNonTsExtensions": true, "checkJs": false, "esModuleInterop": true, - // TODO(lucacasonato): enable this by default in 1.5.0 - "isolatedModules": unstable, + "isolatedModules": true, "jsx": "react", "module": "esnext", "sourceMap": true, diff --git a/cli/tsc_config.rs b/cli/tsc_config.rs index 9d05c33f7..c4028dea9 100644 --- a/cli/tsc_config.rs +++ b/cli/tsc_config.rs @@ -69,6 +69,7 @@ const IGNORED_COMPILER_OPTIONS: [&str; 61] = [ "inlineSourceMap", "inlineSources", "init", + // TODO(nayeemrmn): Add "isolatedModules" here for 1.6.0. "listEmittedFiles", "listFiles", "mapRoot", |