diff --git a/tsconfig.json b/tsconfig.json index fe2b4f6..56402e7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,6 +16,10 @@ "moduleResolution": "bundler", "resolveJsonModule": true, "allowImportingTsExtensions": true, + // Even files without `import` or `export` are treated as modules. + // It helps to avoid mysterious errors such as `Cannot redeclare block-scoped variable 'name`. + // https://www.totaltypescript.com/cannot-redeclare-block-scoped-variable#solution-3-your-module-isnt-a-module + "moduleDetection": "force", // Required in Vue projects "jsx": "preserve",