ligershark / WebOptimizer

A bundler and minifier for ASP.NET Core
Apache License 2.0
753 stars 113 forks source link

Uncaught ReferenceError: a is not defined #230

Open ignaciosalazarcalle opened 2 years ago

ignaciosalazarcalle commented 2 years ago

Hello,

I've followed the steps to install WebOptimizer but, when I load my page I get a "Uncaught ReferenceError: a is not defined".

Example the JS minified:

function u(n, r) {
        var u = n.attr("id")
          , v = n.attr("data-loaded");
        if (v === (!1).toString())
            switch (u) {
            case "cardTemas" + r:
                i(a.format(u.replace("card", "table"), r), u).done(t(tt));
                break;

The error is in the line: i(a.format(u.replace("card", "table"), r), u).done(t(tt));

In my app.Configure I have:

app
     .ConfigureSecurityHeaders(configuration)
     .ConfigureCustomCompression()
     .UseWebOptimizer()
     .UseStaticFiles()

And in my services.ConfigureServices I have:

services
     .AddHttpContextAccessor()
     .AddMemoryCache()
     .ConfigureCustomCompression()
     AddWebOptimizer(true, true)

What am I doing wrong?

Regards