Skip to content

Commit b4ba117

Browse files
authored
Merge pull request #2616 from emilhe/moduleResolution
Add mapping of tsconfig compiler option 'moduleResolution'
2 parents bbe2290 + e37ce5e commit b4ba117

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
77

88
## Fixed
99

10+
- [#2616](https://github.com/plotly/dash/pull/2616) Add mapping of tsconfig compiler option `moduleResolution`, fixes [#2618](https://github.com/plotly/dash/issues/2618)
1011
- [#2596](https://github.com/plotly/dash/pull/2596) Fix react-dom throwing unique key prop error for markdown table, fix [#1433](https://github.com/plotly/dash/issues/1433)
1112
- [#2589](https://github.com/plotly/dash/pull/2589) CSS for input elements not scoped to Dash application
1213
- [#2599](https://github.com/plotly/dash/pull/2599) Fix background callback cancel inputs used in multiple callbacks and mixed cancel inputs across pages.

dash/extract-meta.js

+17
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,23 @@ if (!src.length) {
3838

3939
if (fs.existsSync('tsconfig.json')) {
4040
tsconfig = JSON.parse(fs.readFileSync('tsconfig.json')).compilerOptions;
41+
// Map moduleResolution to the appropriate enum.
42+
switch (tsconfig.moduleResolution) {
43+
case 'node':
44+
tsconfig.moduleResolution = ts.ModuleResolutionKind.NodeJs;
45+
break;
46+
case 'node16':
47+
tsconfig.moduleResolution = ts.ModuleResolutionKind.Node16;
48+
break;
49+
case 'nodenext':
50+
tsconfig.moduleResolution = ts.ModuleResolutionKind.NodeNext;
51+
break;
52+
case 'classic':
53+
tsconfig.moduleResolution = ts.ModuleResolutionKind.Classic;
54+
break;
55+
default:
56+
break;
57+
}
4158
}
4259

4360
let failedBuild = false;

0 commit comments

Comments
 (0)