Files
factorio-clusterio/packages/lib/tsconfig.node.json
Hornwitser 276c36b6e9 Throw error if lib is imported twice (#863)
The lib library was written with the assumption that there's only one
copy of it in the whole application and everything imports that one
copy.  Unfortunately there are quite a few circumstances were package
managers end up installing multiple copies of lib and then different
parts use different versions of the library.

This causes Clusterio to break with strange and hard to track down
errors.  Most notably permissions and link messages for a plugin may get
registered to one copy of lib while the controller uses a different copy
and thus does not see or register that what the plugin added exists.

Detect this condition when importing @clusterio/lib and throw an error
when it has been imported twice in order to prevent the broken
installation from causing future hard to debug issues.
2026-03-06 18:50:18 +01:00

8 lines
161 B
JSON

{
"extends": "../../tsconfig.node.json",
"include": ["index.ts", "build_mod.js", "src/**/*.ts", "src/**/*.js"],
"compilerOptions": {
"allowJs": true,
},
}