Clean solution: use expose-loader !!
npm install expose-loader --save-dev
inside your vendor.ts
import 'expose-loader?jQuery!jquery';
import '../node_modules/signalr/jquery.signalR.js';
inside your webpack.config.ts
new ProvidePlugin({ jQuery: 'jquery', $: 'jquery', jquery: 'jquery' })
Explanation:
The jquery.signalR.js script is indeed not written as a umd module. Which makes it by default, not to be loadable by webpack. It doesn't require jquery, but assumes that Jquery lives on the global variable window.jQuery. We can make this work in webpack by importing the jquery module with the expose-loader. This loader will make sure that the exported value of jquery, is exposed to the jQuery global var. Thus allowing to load the signalr.js script as the next module.
Also if you want to later use signalr by using $, you also will have to use the provideplugin for the jquery module. inside webpack.config.js