Conversation
- needed to tell IDEs to lookup the lookup paths - doesn't affect build, as the `tsconfig.json` in the module directory should be ignored by esbuild of the core app.
There was a problem hiding this comment.
Pull request overview
Adds a local TypeScript configuration for the Wikis frontend module to improve IDE typechecking/path resolution without impacting the core app’s esbuild build.
Changes:
- Add
modules/wikis/frontend/tsconfig.jsonextending the main frontendtsconfig.jsonwith module-specific lookup settings. - Minor import/whitespace adjustments in Wikis module Angular files (no behavioral changes).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| modules/wikis/frontend/tsconfig.json | Introduces a module-local tsconfig extending the core frontend tsconfig for IDE support. |
| modules/wikis/frontend/module/wikis-tab/wikis-tab.component.ts | Whitespace-only change (import section formatting). |
| modules/wikis/frontend/module/main.ts | Reorders imports and adds spacing in the module entry file. |
| "../../../frontend/node_modules/@types", | ||
| "../../../frontend/node_modules" | ||
| ] |
There was a problem hiding this comment.
typeRoots should only point at directories that directly contain type packages (typically .../node_modules/@types). Adding .../node_modules is unlikely to help (scoped packages like @angular/* won’t be discovered as global type packages) and can significantly slow down TS server by scanning all dependencies. If the goal is to resolve regular package imports from frontend/node_modules, prefer keeping typeRoots limited to .../node_modules/@types and add an explicit compilerOptions.paths fallback (e.g., mapping * to node_modules/*) or another approach that targets module resolution rather than global type roots.
| "../../../frontend/node_modules/@types", | |
| "../../../frontend/node_modules" | |
| ] | |
| "../../../frontend/node_modules/@types" | |
| ], | |
| "paths": { | |
| "*": [ | |
| "node_modules/*" | |
| ] | |
| } |
There was a problem hiding this comment.
I don't get it, if I want imports like import { CUSTOM_ELEMENTS_SCHEMA, Injector, NgModule } from '@angular/core'; being resolved in this directory, I need the classes defined in the node_modules from the root app.
I do not have any node_modules installed in the wiki module sub path.
|
@Kharonus ideally this would be fixed globally - for all modules including |
|
yes, ideally. I have no solution in my pocket directly, and I'd like to continue coding in the new wikis module asap. Hence, I'd like to merge that PR as is. And find a general solution later. |
What are you trying to accomplish?
What approach did you choose and why?
tsconfig.jsonin the module directory should be ignored by esbuild of the core app.