backbone.js - How to let Webpack require a root node_module instead of an child package? -
i have installed backbone , backbone.babysitter trough npm. when use backbone in scripts this: import backbone "backbone";
loads installed backbone version 1.2.1
. works fine until want use backbone.babysitter. when backbone.babysitter loads needs add properties backbone itself. package of backbone.babysitter imports own backbone dependency in own node_modules folder, backbone on 1.2.0
. attaches methods different backbone working with.
how can force webpack require backbone root node_modules
folder backbone.babysitter?
found workaround here
module.exports = { resolve: { alias: { 'backbone': require.resolve('backbone') } } }
Comments
Post a Comment