How do I generate new co…
How do I generate new components/controllers/services/modules/etc in the location I want? On ng or nest apps i am able to to run nest g mo myfolder/ otherfolder/target/modulename
, but nx creates a src
folder in root and places everything there.
Responses:
well using the nest cli has the src hardcoded, you may want to try using @nrwl/nestjs
schematics instead. if you want to use nestjs schematics you must use –path and –sourceRoot
–sourceRoot is where you want the component parent folder and –path is within the lib/component
i normally do
--sourceRoot='../libs/path/to/lib' --path='src/lib'
it worked thank you.