コード例 #1
0
        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());
        }
コード例 #2
0
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            filterContext.Controller.ViewBag.Assets = WebpackHelper.GetAssets();

            base.OnActionExecuting(filterContext);
        }