1

Im trying to combine many scripts into one bundle like that

bundles.Add(new ScriptBundle("~/bundles/freeboard").Include(
          "~/Scripts/Freeboard/DatasourceModel.js",
          "~/Scripts/Freeboard/DeveloperConsole.js",
          "~/Scripts/Freeboard/DialogBox.js",
          "~/Scripts/Freeboard/freeboard.js",
          "~/Scripts/Freeboard/FreeboardModel.js",
          "~/Scripts/Freeboard/FreeboardUI.js",
          "~/Scripts/Freeboard/JSEditor.js",
          "~/Scripts/Freeboard/PaneModel.js",
          "~/Scripts/Freeboard/PluginEditor.js",
          "~/Scripts/Freeboard/ValueEditor.js",
          "~/Scripts/Freeboard/WidgetModel.js"));

In my view:

@section Scripts {
@Scripts.Render("~/bundles/freeboard")
}

and looks like there are missing scripts in bundle, because i have an error "Uncaught ReferenceError: FreeboardUI is not defined", but as we can see there in the bundle we have script FreeboardUI.

  • 1
    The problem might be the order in which the scripts are included into the bundle, not a missing script. This might help: How can I specify an explicit ScriptBundle include order? You can see the order in which the scripts are bundled and whether every script is actually included in the developer console in you browser. – Eduard Malakhov Jan 25 '17 at 11:07

0 Answers0