Incluir la versión minificada de jQuery en los paquetes hace que no se cargue

Ok folks, this is what happens:

I have the BundleConfig class registering bundles, like usual:

bundles.Add(
    new ScriptBundle("~/scripts/vendor")
        .Include("~/scripts/jquery-{version}.min.js")
        .Include("~/scripts/bootstrap.min.js"));

That actually does not load the jQuery file, causing bootstrap to not work. BUT, when I replace ".min.js" para ". Js", thus using the debug version, everything works just fine, like so:

bundles.Add(
    new ScriptBundle("~/scripts/vendor")
        .Include("~/scripts/jquery-{version}.js")
        .Include("~/scripts/bootstrap.min.js"));

For the record, I got all the files in place; spelling checks; everything is in the same guiones carpeta.

I don't know what else could be wrong; and I doubt the file from jQuery is corrupted some how, since it was downloaded directly from NuGet!

preguntado el 27 de noviembre de 13 a las 05:11

1 Respuestas

To whoever might be interested. I just found out what the problem was; and it was a silly one.

In order for minified files to work correctly, including jquery-{version}.min.js, which was causing me problems, you gotta have debug mode turned off in your web.config file, like so:

<system.web>
    <compilation debug="false" targetFramework="4.5" />
</system.web>

Anyways, problem solved!

respondido 28 mar '14, 03:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.