Skip to content

1.0.6

Compare
Choose a tag to compare
@stefanprodan stefanprodan released this 14 Oct 13:45
· 268 commits to master since this release
New in RequireJS.NET v1.0.6

RenderRequireJsSetup has a new optional param configPath, using configPath you can override the default config file.

Example of loading RequireJS.release.config when the website is running in release mode:

@using RequireJS

<!DOCTYPE html>
<html>
    ....
    <body>
    ....

    @if (HttpContext.Current.IsDebuggingEnabled)
    {
        @Html.RenderRequireJsSetup(Url.Content("~/Scripts"),
        Url.Content("~/Scripts/require.js"))
    }
    else
    {
        @Html.RenderRequireJsSetup(Url.Content("~/Scripts"),
        Url.Content("~/Scripts/require.js"),
        Server.MapPath("~/RequireJS.release.config"))
    }

    </body>
</html>