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
Create a project with @o3r/create, then generate an app and a lib:
npm create @o3r project
ng g application app
ng g library lib
Current result
File tsconfig.base.json is not generated.
File tsconfig.build.json is not generated.
The app and lib tsconfig files extend ../../tsconfig.json root file.
In the lib tsconfig.spec.json file, there is a reference to path ./tsconfig.build.composite.json, but this file was not generated.
The path mapping in tsconfig.json file is not properly configured: the generated path mapping is "lib": ["libs/lib/dist", "libs/lib/src/public-api"], which does not allow for a proper IDE navigation. A proper config could also ease local lib development (today you have to run ng build lib --watch to have your lib changes live reloaded).
Expected result
The generated configuration should be similar to the one of o3r monorepo, with tsconfig.base.json and tsconfig.build.json files generated, and the app and lib properly referencing these files. Path mappings should also be properly configured.
Additional comments
No response
The text was updated successfully, but these errors were encountered:
malek-benazzouz
changed the title
[Bug]: tsconfig.base.json and tsconfig.build.json are not properly generated
[Bug]: tsconfig.base.json and tsconfig.build.json are not properly generated
Jan 6, 2025
malek-benazzouz
changed the title
[Bug]: tsconfig.base.json and tsconfig.build.json are not properly generated
[Bug]: tsconfig.base.json and tsconfig.build.json are not properly generated
Jan 6, 2025
Additional note: fixing the path mappings will also fix the following unit test issue, that is raised as soon as we try to call a lib component from the app:
Could not locate module @nevio/library mapped as: ..\libs\lib\dist,libs\lib\src\public-api
To be confirmed:
Today the generated tsconfig.lib.prod.json extends ./tsconfig.lib.json, but the expected behavior is that it should extend ../../tsconfig.build.json instead.
## Proposed change
fix(workspace): the tsconfig links to generate libraries
It fixes the following points:
- generate the tsconfig.build.json (mandatory for lib standalone
publishing)
- remove the `dist/` path from the `tsconfig.base.json` which is leading
to wrong path mapping when the library was locally built
- register properly the lib in both tsconfig files
- update the tsconfig.lib.prod.json to extend the correct tsconfig
<!--
Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
-->
## Related issues
<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->
<!-- * 🐛 Fix #issue -->
* 🐛 Fix resolves#2665
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * Pull Request #issue -->
Package name
core
Package version
11.5.3
Reproduction steps
Create a project with @o3r/create, then generate an app and a lib:
Current result
tsconfig.base.json
is not generated.tsconfig.build.json
is not generated.../../tsconfig.json
root file.tsconfig.spec.json
file, there is a reference to path./tsconfig.build.composite.json
, but this file was not generated.tsconfig.json
file is not properly configured: the generated path mapping is"lib": ["libs/lib/dist", "libs/lib/src/public-api"]
, which does not allow for a proper IDE navigation. A proper config could also ease local lib development (today you have to runng build lib --watch
to have your lib changes live reloaded).Expected result
The generated configuration should be similar to the one of o3r monorepo, with
tsconfig.base.json
andtsconfig.build.json
files generated, and the app and lib properly referencing these files. Path mappings should also be properly configured.Additional comments
No response
The text was updated successfully, but these errors were encountered: