public IActionResult Index() { const string JAVASCRIPT_KEY = "js"; JObject json = WebpackHelper.GetWebpackAssetsJson(_applicationBasePath); ViewBag.VendorScripts = json.SelectToken("vendor").Value <string>(JAVASCRIPT_KEY); ViewBag.AppScripts = json.SelectToken("app").Value <string>(JAVASCRIPT_KEY); return(View()); }
protected override void OnActionExecuting(ActionExecutingContext filterContext) { filterContext.Controller.ViewBag.Assets = WebpackHelper.GetAssets(); base.OnActionExecuting(filterContext); }