I have the following situation:
Frontend's
package.json{ "dependencies": { "lib" : "1.0.0", "foo" : "1.0.0" } }lib's
package.json{ "devDependencies": { "foo" : "1.0.0" }, peerDependencies": { "foo" : "1.0.0" } }
While I am developing with webpack-dev-server some Frontend I am linking the module foo with a npm link leading into this dependency tree of the Frontend:
├── foo@1.0.0
└─┬ lib@1.0.0
└── foo@1.0.0
Rather than having something like this:
├── foo@1.0.0
└── lib@1.0.0
I have already found out that webpack finds the module foo in my lib in its node_modules folder, because I defined this package as devDependencies for my unit tests. Now I have the package twice in my bundled source which leads into some bugs.
Question: How can I force webpack or npm to use the module foo of my parent (the Frontend) in my lib like the peerDependencies suggests?
from Linking npm package with equal devDependencies and peerDependencies breaks application in development using webpack
No comments:
Post a Comment