Use node_modules of parent directory in child projects

1.6k Views Asked by At

I have one master project, with little projects inside, and I want to use node_modules of the main project on the little ones, for don' generate extra folders with the same node_modules.

I want to use SASS, bootstrap and jquery in my HTML/PHP projects.

I did a basic configuration on webpack. I required jquery and bootstrap. But I think I need to configure the loaders to.

MAIN PROJECT
    -assets/
    -node_modules/
    -index.php
    -package.json
    -webpack.config.js

    -PROJECT.1
        -assets/
        -node_modules/
        -package.json
        -index.php
    -PROJECT.2
        -assets/
        -node_modules/
        -package.json
        -index.php
    -PROJECT.3
        -assets/
        -node_modules/
        -package.json
        -index.php
0

There are 0 best solutions below