I have installed backbone and backbone.babysitter trough npm. When I use backbone in my scripts like this: import Backbone from "backbone";
It loads the installed backbone version 1.2.1
. This works fine until I want to use backbone.babysitter. When backbone.babysitter loads it needs to add properties to backbone itself. But the package of backbone.babysitter imports its own backbone as dependency in his own node_modules folder, this backbone is on 1.2.0
. So it attaches his methods to a different backbone i am working with.
How can I force Webpack to require the backbone from the root node_modules
folder for backbone.babysitter?
Found a workaround here