-
-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
Accidentally applied `es6` when compilerOptions.module was not defined.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,10 +149,14 @@ const sanitizeTSConfig = (config: any, esm: boolean = false) => { | |
// | ||
// @see https://github.com/apollographql/react-apollo/pull/1402#issuecomment-351810274 | ||
// | ||
if (!esm && safeConfig.compilerOptions.module) { | ||
safeConfig.compilerOptions.module = "commonjs" | ||
} else { | ||
safeConfig.compilerOptions.module = "es6" | ||
if (safeConfig.compilerOptions.module) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
FrederickEngelhardt
|
||
if (!esm) { | ||
// .ts files should fall back to commonjs | ||
safeConfig.compilerOptions.module = "commonjs" | ||
} else { | ||
// .mts files must use `import`/`export` syntax | ||
safeConfig.compilerOptions.module = "es6" | ||
} | ||
} | ||
|
||
return safeConfig | ||
|
Hello, will this fix the issue for
tsconfig.json
when usingextends
which references another tsconfig.(XYZ).json compilerOptions that set a module?Perhaps an alternative would be to directly reference or allow referencing of a specific typescript config file.
We are unable to use danger 12.3.2 or 12.3.3 (breaking CI/CD, pipelines due to this).
Example:
tsconfig.build.json
tsconfig.json