There are two kinds node dependencies. If you look at you package.json there is a section “devDependencies”. Node libraries included in these are never used in prod builds. These mostly include libraries that are used to assist in development process e.g testing , module bundler, transpilers etc.

From Ionic 2 perspective production build has a final JS bundle which is a transpiled, concatenated and minified JS file with all the modules (and their dependencies) that you used/imported in your code.