Where to install dependencies when creating a Module

Hello, I am creating an Ionic project and I’m wondering what dependencies I should set for productions and which for development in the package.json

Do I need to put dependencies such as @ionic-native-… ionic-angular, @angular- in production dependencies of my module? If so, why? Or why not?

As I understand it if I put it in the production dependencies my module will always work in any Ionic version, for example?

Thanks.

Hello,
hmm if you install via npm a package then it is automatically added to package.json into the right place. In devDepenencies are only packages that are need for development and not for production.
Normally it is not necessary to add manually anything in package json. And I am not sure what do you mean with ‘my module’.

Best regards, anna-lieb

I am making an Ionic module following this tutorial: https://devdactic.com/custom-ionic-module-npm/

And I don’t need if I need to add dependencies such as angular/core or ionic-angular to the dev dependencies or to prod dependencies through npm cli

Hello,
if you go to npm you should see after publishing your npm package. Okay?
You install it via npm you should see in in package.json in dependecies. Okay? devDependencies are only for development and not shipped with your release.
Also it should be in nodes_module folder.

In ionic you handle and import it like an other package. providers go to ngModule provider section, modules go to import section. entrycomponents only if your components not part of templates (which is mostly not the case),

Best regards, anna-liebt.

You don’t understand me. I know the difference between dependencies and devDependencies.

What I don’t know is where to put certain packages such as ionic-angular, @ionic-native/network or @angular/core .

What I want is that when I install the module I am developing in my Ionic App through npm I don’t have to install those dependencies in my Ionic App again. I guess that if I put my dependencies in dependencies in the module I am developing I won’t have to install them in my App but if I put them in devDependencies I’ll have to install them again in my App, am I right?

Hello,

sorry. Maybe somebody else could help you.

Best regards, anna-liebt