bundling-and-minification

With Firebase Hosting how do I turn off bundling and minification?

只谈情不闲聊 提交于 2019-12-21 21:36:18
问题 I am pleased with how quickly I can get my AngularJS and Firebase app deployed to Firebase Hosting, but it appears that local CSS and JavaScript files are bundled and minified as part of executing $firebase deploy I would like to debug the JavaScript after deploying. How do I turn off bundling and minification as part of the deploy? 回答1: We're currently in beta and this is something we will be implementing soon but I'm afraid at this time it's not possible to turn off the minification and

System.Web.Optimization changes order of js files when minifying javascript

蓝咒 提交于 2019-12-21 17:44:07
问题 I am observing a very peculiar behaviour when minifying files with System.Web.Optimization , I am already using IBundleOrderer that works fine in preserving file order when I am not minifying the files public class RespectGivenBundleOrder : IBundleOrderer { public IEnumerable<BundleFile> OrderFiles(BundleContext context, IEnumerable<BundleFile> files) { return files; } } public static void RegisterTestingBundle(BundleCollection bundles) { var bundle = new ScriptBundle("~/OnTheMoveWebFiles

Automatically switching to minified CSS & JS files in different environments

随声附和 提交于 2019-12-21 05:37:06
问题 I am using ASP.Net MVC 5 and also taking advantage of WebEssentials LESS and bundle features. WebEssentials is setup to create minified css and js files on save. This is a feature I want because I can monitor the output and it lowers the application startup time ( not using Asp.Net MVC bundles ). How can I automatically get my app to use the minified version of the files when it is deployed without having to manually change the file names? So, for example, from: <link href="somestyles.css" ..

ASP.NET MVC 4 ScriptBundle returns empty

谁说我不能喝 提交于 2019-12-21 04:00:11
问题 Specifically, I am trying to create a ScriptBundle in MVC 4 with already minified scripts, and return this same Bundle whether the project is in Debug or not. My web project references the MVC Telerik Grid NuGet package. In that package, Telerik only provides the minified JS files. Bundling code is below. // telerik scripts bundles.Add(new ScriptBundle("~/scripts/bundles/telerik").Include( "~/Scripts/2012.1.214/telerik.common.min.js", "~/Scripts/2012.1.214/telerik.textbox.min.js", "~/Scripts

How can I add the result of an ASP.NET MVC controller action to a Bundle?

回眸只為那壹抹淺笑 提交于 2019-12-20 10:38:08
问题 I have a controller action that returns Javascript file. I can reference this file from my view and it works fine. I'd like to put it in a System.Web.Optimization.Bundle with the other JS files. I'm trying to do this, essentially: new Bundle().Include("~/DynamicScript/UrlDictionary"); The other files in my Bundle get rendered just fine, but this one is ignored. Seeing this behavior, my assumption is that bundling gets handled before the application is able to resolve URLs through the routing

Angular2 TypeScript transpiler with Minification / Uglify

馋奶兔 提交于 2019-12-20 05:18:06
问题 I'm developing a web application in Visual Studio 2015 with Angular2 and TypeScript . I'm using Gulp to generate distributed minified js files. With Angular2 I see, that there is no need to transpile TypeScript neither with Visual Studio nor with Gulp as SystemJs does it when importing the module. Now is the question: How does SystemJs work with minification, uglification and so on? System.import('app/main').then(null, console.error.bind(console)); How do I minify or uglify this? 回答1:

BundleTable.Bundles.GetBundleFor() returns but not Items inside

∥☆過路亽.° 提交于 2019-12-19 04:07:29
问题 Briefly: Bundles which contain items from a VirtualPath (Served by custom VirtualPathProvider) don't work. Hash isn't generated in the v= and resolving them shows the .Items property as empty. Detailed: Suppose we have a bundle registration: bundles.Clear(); bundles.ResetAll(); BundleTable.EnableOptimizations = true; bundles.Add(new StyleBundle("~/bundles/css") .Include("~/Content/site.css")); bundles.Add(new StyleBundle("~/bundles/admin/somestyle") .Include("~/Areas/Admin/Content/css/aaa2

How to manage ASP.NET Core bundleconfig.json for multiple environments?

孤人 提交于 2019-12-19 02:47:36
问题 What's the best practice for using the ASP.NET Core bundleconfig.json with development versus production environments? The prior bundler (BundleCollection) would pay attention to the DEBUG compiler directive and not minify the list of scripts when you're debugging. It appears as though the new paradigm is to have <environment> tags in the HTML templates that test for the ASPNETCORE_ENVIRONMENT value. Though I don't see a way of incorporating that environment variable into the bundleconfig

Is there an easy way to render absolute URLs with Microsoft Web Optimization framework / script bundling?

烈酒焚心 提交于 2019-12-18 21:14:41
问题 I'm trying to render a JavaScript bundle using Microsoft's Web Optimization framework, like this: @Scripts.Render("~/assets/bundle.js") And building a small bundle, like this: public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/assets/bundle.js") .Include( "~/scripts/jquery-2.1.0.min.js", "~/scripts/somescript.js" )); ... } But when optimizations are on, it only renders a relative URL, like this: <script src="/assets/bundle.js?v

Bundle file location in ASP.NET MVC

戏子无情 提交于 2019-12-18 12:59:17
问题 Where are the generated bundle files placed? bundles.Add(new ScriptBundle("~/bundles/jqueryall") .IncludeDirectory("~/scripts/", "*.js", true) 回答1: There are no files, bundles are stored in-memory. Can you please explain why you expect the bundles to be files? :-) 回答2: They are bundled up dynamically (in Memory I assume) and served to the client being sent down to the client as a single item (you should the single JS file see it if you use fiddler of F12 => Network). 来源: https://stackoverflow