-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
The error:
search-results-min.js?_gpiav_=270:2 jQuery.Deferred exception: r is not defined ReferenceError: r is not defined
at s (MYSITE/Scripts/bundles/search-results-min.js?_gpiav_=270:2:30591) undefined
It happens only when it's bundled. Otherwise it works just fine.
I tried to use both minified and unminified jQuery versions - the same results. It works in any case with jQuery 3.2.1.
RequireJS.json:
{
"paths": {
"jquery": "External/jquery-3.4.1.min"
},
"shim": {
},
"autoBundles": {
"search-results-min": {
"outputPath": "Bundles/",
"include": [ { "directory": "Controllers/Root/SearchResults" } ]
}
}
}
RenderRequireJsSetup:
@using RequireJsNet
@using Utils
@using Utils.Common
@Html.RenderRequireJsSetup(new RequireRendererConfiguration
{
RequireJsUrl = Url.Content("~/Scripts/require.min.js"),
BaseUrl = Url.Content("~/Scripts/"),
ConfigurationFiles = new[] { "~/RequireJS.json" },
EntryPointRoot = "~/Scripts/",
Logger = null,
UrlArgs = Config.GetResourceVersionSuffix(),
WaitSeconds = 15,
LoadOverrides = !HttpContext.Current.IsDebuggingEnabled
}).ToSingleLineHtmlString()
The module:
require(['jquery'],
function ($) {
"use strict";
var searchResults = function () {
this.init();
alert('hello world');
};
searchResults.prototype.init = function () {
};
//DOM ready
$(function () { var entryPoint = new searchResults(); });
});
NuGet versions:
RequireJS - 2.3.6
RequireJsNet - 3.1.0
RequireJsNet.Compressor - 3.1.0
.NET Framework: 4.7.2
Metadata
Metadata
Assignees
Labels
No labels