dsuryd / dotNetify

Simple, lightweight, yet powerful way to build real-time web apps.
https://dotnetify.net
Other
1.17k stars 164 forks source link

Minor error in signalR-netfx.js #126

Closed larsbuch closed 5 years ago

larsbuch commented 6 years ago

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.

dsuryd commented 6 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.

larsbuch commented 6 years ago

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'

dsuryd commented 6 years ago

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.