Closed larsbuch closed 5 years ago
I think the problem was caused by not including jquery-shim.js
in the dist
folder along with signalR-nextfx.js
. I'll include it in the next publish, so the require
path won't need to change.
That would also solve the problem if you need to keep a very specific 'jquery-shim' but is it not better to have it as requirement. Webpack will work with both if bundling. I would prefer the dependency myself as it makes it easier to understand all dependencies unless you have custom changes in 'jquery-shim'
It cannot be an external dependency since the shim is my own, custom made for signalR client library v2.x, and shouldn't be used for anything else.
In npm package dotnetify there seems to be an error in the dotnetify/dist/signalR-netfx.js where jquery-shim cannot be resolved
By changing signalR-netfx.js line 30 from
_window.jQuery = window.jQuery || require('./jquery-shim');
to_window.jQuery = window.jQuery || require('jquery-shim');
then it can resolve the jquery-shim.The background is that I am in the process of packing all client-side modules (http://dotnetify.net/core/getstarted) that we use everywhere as one bundle and smaller bundle for the different modules for the website for an ASP.NET website.