I have written a npm package (call it ABC
) that I am testing out in a create react app. This package uses Webpack. My package also depends upon another package (cal
I have come to solve my own issue with a trivial solution. When I was using package DEF
inside javascript files in my ABC
package, I was including it via the import
statement like so: import 'DEF';
. Simply changing this to require ('DEF');
was the solution. At the moment I am investigating why this made all the difference. It should be noted that I did not need to configure my ABC
's webpack configuration to handle the javascript so I have since removed the providerPlugin and externals object that accounted for the jQuery.
This helps to explain why this is the case.