S
S
Serdji2016-12-23 09:28:23
Node.js
Serdji, 2016-12-23 09:28:23

How to move the node_modules folder when installing modules?

Hello. The question is, we have a rail project and in order for the deployment to go faster, it is necessary that when installing "npm i" modules, the node_modules directory appears in the vender directory, and not in the project root. Where is this configuration written and how to change the webpack config in the future so that it looks for modules along the vender/node_modules path?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Kitmanov, 2016-12-23
@ssumatokhin

npm has no such configuration. Where package.json is (or where npm install is called) node_modules will be there.
There are three options: 1) change npm to bower, where the path to the directory is configured, 2) change webpack + npm to systemjs + jspm, this path is also configured in jspm, and 3) deploy the frontend separately.

H
Hikmat Abdunabiev, 2016-12-23
@Khikmat

stackoverflow.com/questions/26293049/specify-path-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question