如何使用requirejs加载jQuery插件intlTelInput?

How to use requirejs to load jQuery plugin intlTelInput?

有问题的插件是 https://github.com/Bluefieldscom/intl-tel-inputrequirejs 正确插入了所有脚本标签,但我仍然无法使用插件 intlTelInput

我错过了什么?

require.config({
    baseUrl: "/Scripts/require",
    paths: {
        "jquery": "/Scripts/jquery-2.1.3.min",
        // jquery plugins
        "intlTelInput": "/Scripts/jquery/plugin/intlTelInput-5.3.0.min"
    }
});

define(["jquery", "intlTelInput"], function ($, tel) {
    console.log(tel); // output: undefined
});

显然,jQuery 插件必须通过 jQuery 访问。

require.config({
    baseUrl: "/Scripts/require",
    paths: {
        "jquery": "/Scripts/jquery-2.1.3.min",
        // jquery plugins
        "intlTelInput": "/Scripts/jquery/plugin/intlTelInput-5.3.0.min"
    }
});

define(["jquery", "intlTelInput"], function ($, tel) {
    console.log($().tel); // now it works
});