rollup-plugin-force-binding
Force all import bindings for a module to come from one absolute source. Useful for bundles with multiple entry points that have shared dependencies at different absolute paths.
// entry A;// resolved path: ~\path\to\A\node_modules\some-dependency\... // entry B;// resolved path: ~\path\to\B\node_modules\some-dependency\... // resulting in bundled duplicatesvar SomeDependency = {};var EntryA = {}SomeDependency; var SomeDependency$2 = {};var EntryB = {}SomeDependency$2;
Install
$ npm i rollup-plugin-force-binding [--save-dev]
Usage
If used in junction with node-resolve, place force-binding BEFORE in the plugin array.
; rollup;
License
MIT