Open gitleet opened 5 years ago
Another thing I noticed is that now that I set the modules to [nodePath], when I start my app using
yarn run dev:project1
It only looks in ./node_modules not in ./project1/node_modules
So I didn't append the ./ to the module resolution lookup correctly.
Any tips?
Hey @gitleet, did you ever get this resolved? I'm having the same issue.
@jhalvorson just create it if it doesn't exist
config.resolve.modules = (config.resolve.modules || []).concat([nodePath])
I have a multi nodejs project setup like this:
So I want to be able to reference the shared folder code from within my other projects. To do this I have to add path ./ to the NODE_PATH when I run my project1 for example:
So I need to add the value of NODE_PATH to my resolve modules in the backpack config:
Should the config.resolve.modules be undefined at this point? (that is what I am seeing) so I am doing this instead:
The reason I am confused is because this other project that uses backpack is a .push call https://github.com/withspectrum/spectrum/blob/alpha/backpack.config.js#L36
When I try the same thing I can see that the modules array is actually undefined.