Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Gianni Declercq 2 posts 72 karma points
    1 week ago
    Gianni Declercq

    MVC Bundles not working Umbraco 8

    I'm trying to use an MVC BundleConfig for my CSS and Scripts. But in release mode I always get a 404 not found when loading these assets.

    My bundleconfig:

    public static void RegisterBundles(BundleCollection bundles)
        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
        bundles.Add(new ScriptBundle("~/bundles/js/iziModal.min.js", 
        bundles.Add(new ScriptBundle("~/bundles/js").Include(
              "~/assets/js/main.js", "~/assets/js/vendor.js"));
        bundles.Add(new StyleBundle("~/bundles/css").Include(
        #if DEBUG
                BundleTable.EnableOptimizations = false;
                BundleTable.EnableOptimizations = true;

    I also registered the config at startup



    <add key="Umbraco.Core.ReservedPaths" value="~/.well-known/,~/bundles/" />

    What am I doing wrong here?

  • Yakov Lebski 311 posts 1204 karma points
    1 week ago
    Yakov Lebski

    How you call RegisterBundles ?

Please Sign in or register to post replies

Write your reply to: