Skip to content

Commit a3024a6

Browse files
authored
BREAKING(cli/tsc): Enable isolatedModules by default (#8050)
1 parent f56c786 commit a3024a6

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

cli/module_graph2.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -698,17 +698,14 @@ impl Graph2 {
698698
options: CheckOptions,
699699
) -> Result<(Stats, Diagnostics, Option<IgnoredCompilerOptions>), AnyError>
700700
{
701-
// TODO(@kitsonk) set to `true` in followup PR
702-
let unstable = options.lib == TypeLib::UnstableDenoWindow
703-
|| options.lib == TypeLib::UnstableDenoWorker;
704701
let mut config = TsConfig::new(json!({
705702
"allowJs": true,
706703
// TODO(@kitsonk) is this really needed?
707704
"esModuleInterop": true,
708705
// Enabled by default to align to transpile/swc defaults
709706
"experimentalDecorators": true,
710707
"incremental": true,
711-
"isolatedModules": unstable,
708+
"isolatedModules": true,
712709
"lib": options.lib,
713710
"module": "esnext",
714711
"strict": true,

cli/tsc.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,8 +716,7 @@ pub async fn runtime_compile(
716716
"allowNonTsExtensions": true,
717717
"checkJs": false,
718718
"esModuleInterop": true,
719-
// TODO(lucacasonato): enable this by default in 1.5.0
720-
"isolatedModules": unstable,
719+
"isolatedModules": true,
721720
"jsx": "react",
722721
"module": "esnext",
723722
"sourceMap": true,

cli/tsc_config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const IGNORED_COMPILER_OPTIONS: [&str; 61] = [
6969
"inlineSourceMap",
7070
"inlineSources",
7171
"init",
72+
// TODO(nayeemrmn): Add "isolatedModules" here for 1.6.0.
7273
"listEmittedFiles",
7374
"listFiles",
7475
"mapRoot",

0 commit comments

Comments
 (0)