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
When generating a component using "@nrwl/angular:component" schematics, the import path in the module has a duplication of the component directory.
For example, generating a component using nx g @nrwl/angular:component test gives import { TestComponent } from './test/test/test.component'; in the declaring module. Note the duplicate '/test' in the path, which makes the import path wrong.
Run npx create-nx-workspace@latest --name myworkspace --preset angular-monorepo --appName myapp
Execute nx g @nrwl/angular:component test --project myapp
The app module will have the import path
import { TestComponent } from './test/test/test.component';
instead of
import { TestComponent } from './test/test.component';
Current Behavior
When generating a component using "@nrwl/angular:component" schematics, the import path in the module has a duplication of the component directory.
For example, generating a component using
nx g @nrwl/angular:component test
givesimport { TestComponent } from './test/test/test.component';
in the declaring module. Note the duplicate '/test' in the path, which makes the import path wrong.Expected Behavior
The import path should be generated correctly.
GitHub Repo
https://github.com/geraldcsoftware/nx-examples
Steps to Reproduce
npx create-nx-workspace@latest --name myworkspace --preset angular-monorepo --appName myapp
nx g @nrwl/angular:component test --project myapp
The app module will have the import path
import { TestComponent } from './test/test/test.component';
instead of
import { TestComponent } from './test/test.component';
Nx Report
Failure Logs
No response
Additional Information
Using @schematics/angular, the generated import path is correct.
E.g. running
nx g @schematics/angular:component test
gives the import pathimport { TestComponent } from './test/test.component';
The text was updated successfully, but these errors were encountered: