Can Angular CLI auto include moduleId in new components?

Quick question: I can be blind or stupid. But is there a flag in the CLI so I can create every component I create add moduleId: module.id

to my decorator @Component

?

Updates: To understand a little bit, I'm trying to use a command ngu-sw-manifest

from a package called ng-pwa-tools

.

Additional Updates: I know some people have said that the CLI recommends no more use moduleId

, but I base this need on what a member of the Angular team said .

+3


source to share


1 answer


As elsewhere , moduleId

not required in apps angular-cli

. The reason for this is that under the hood, webpack automatically adds moduleId

to the last package; so it comes as no surprise that there are no command line parameters associated with moduleId

.



+1


source







All Articles