Skip to content

Commit 8f76bd9

Browse files
authored
Fix addons path alias in tsconfig (#17179)
There is a misconfiguration in the addons package tsconfig.build.json that sets the path alias "addons" to the addons dist, while at the same time the include section lists the addons src, and the "addons" alias is referenced in the root index.ts for the public umd package. This results in TypeScript seeing two different js files (modules) with the same name and structure, but since they are different modules, they are different types from the standpoint of TypeScript, which are not compatible in non-duck-typing scenarios. I'm not sure how we haven't hit this in the past, but we are hitting it now with newer PRs. The fix is just to update the "addons" alias to point to src, which is exactly how it is configured for other packages. I suspect this was just a typo since addons was first introduced but somehow we just weren't hitting errors caused by it. cc @RolandCsibrei
1 parent 7e191ac commit 8f76bd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/public/umd/babylonjs-addons/tsconfig.build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"importHelpers": true,
1010
"paths": {
1111
"core/*": ["dev/core/dist/*"],
12-
"addons/*": ["dev/addons/dist/*"]
12+
"addons/*": ["dev/addons/src/*"]
1313
}
1414
},
1515
"include": ["./src/**/*", "../../../dev/addons/src/**/*"]

0 commit comments

Comments
 (0)