You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice, if the configuration would allow some overwrites to the tsconfig.json which is applied to the lambda bundling.
For example, we are trying to use inverisfy.js inside the lambdas for dependency injection. For that to work, we would need to set the following properties:
Introduce two new optinal files: tsconfig.lambdas.json and tsconfig.cdk.json (or any other names to distinguish)
If those files exist, the project info picks them up so it can be later merged into the default default config file before beeing generated
If you like lets start a small discussion over this topic, potential problems or improvements.
I would be happy to contribute to this awesome project by implementing those ideas.
Greetings
Viktor
The text was updated successfully, but these errors were encountered:
I have a similar problem with the default tsconfig.json.
In our project we use npm workspaces with hoisting, which means that all dependencies show up in the root node_modules directory, in addition to per-workspace node_modules directories that contain alternative versions of dependencies.
I have two workspaces, A and B, and workspace A uses cdkdx, while workspace B uses Storybook.
Among the dependencies of Storybook there is @types/overlayscrollbars, which uses NodeListOf<TNode> from the typescript's dom library. That dependency is added to the root node_modules directory.
However, when cdkdx build is executed in workspace A, the created tsconfig.json files defines the compiler libs like this:
"lib": [
"es2018"
],
So it doesn't include the dom library.
Since all typings from the root node_modules/@types are considered by the compiler, the compilation in workspace A fails:
I wish there was a way to redefine lib as ["es2018", "dom"] in tsconfig.json.
PS. As a temporary remedy, I can unignore tsconfig.json, modify it the way I want and commit it to the repository. This way I get the options I need, but on the other hand I don't get any updates to tsconfig.json from the future versions of cdkdx. This looks like a reasonable tradeoff to me, as I have to pin cdkdx to version 1.3.0 at the moment anyway. But that's a story for another day.
It would be nice, if the configuration would allow some overwrites to the tsconfig.json which is applied to the lambda bundling.
For example, we are trying to use inverisfy.js inside the lambdas for dependency injection. For that to work, we would need to set the following properties:
I would suggest, the following changes:
tsconfig.lambdas.json
andtsconfig.cdk.json
(or any other names to distinguish)If you like lets start a small discussion over this topic, potential problems or improvements.
I would be happy to contribute to this awesome project by implementing those ideas.
Greetings
Viktor
The text was updated successfully, but these errors were encountered: