Questions tagged [bundling-and-minification]

Bundling and minification are used to optimize web content by reducing the number of requests to the server and as well as the size of requested assets (such as CSS and JavaScript).

Bundling makes it easy to combine or bundle multiple files into a single file. You can create CSS, JavaScript and other bundles. Fewer files means fewer HTTP requests and that can improve first page load performance.

Minification performs a variety of different code optimizations to scripts or CSS, such as removing unnecessary white space and comments and shortening variable names to one character.

References:

  1. Bundling and Minification
  2. Adding Bundling and Minification to ASP.NET Web Forms
  3. Adding Web Optimization to a Web Pages Site
  4. Performance Implications of Bundling and Minification on Web Browsing
1258 questions
-1
votes
1 answer

Web optimizer .net core

Upgrading .net 4.8 mvc app to .net 6. I am keeping the static content in the same folders as in the previous web app project and using the web optimizer to minify and bundle. I am seeing lot of console errors and the UI is not loading for the…
-1
votes
1 answer

How can I check the type of a React functional component at run-time?

Say I have apples and bananas: function Apple() { return
Apple
} function Banana() { return
Banana
} I want to put some in a : How can I check their…
Sasgorilla
  • 2,403
  • 2
  • 29
  • 56
-1
votes
1 answer

Executing long taking uglifyjs on VPS

I have a VPS server where I am updating the code and one step is to execute UglifyJS, this is very slow and takes about 20 seconds. Our VPS will always kill the process that takes 100% CPU for longer than 10 seconds. So what I do is start uglify…
exebook
  • 32,014
  • 33
  • 141
  • 226
-1
votes
2 answers

Angular 2 create single app.min.js for production

i've been searching for answers for last 4 hours and couldn't get the answer so i'll ask it myself and hope i can get the answer i'm using gulp to build my ts files in my angular app, i have lots of components and lots of sdk files for rxjs…
nikagar4
  • 830
  • 4
  • 11
  • 23
-1
votes
1 answer

CDN script failover mechanism

I am using a script bundle in an MVC application to load a script from CDN using the code below: bundles.Add(new ScriptBundle("~/bundles/jqueryValidate",…
Andrei Petrut
  • 390
  • 2
  • 15
-1
votes
1 answer

Why are my bundles not loaded even when they have been included in the BundlesConfig?

I have jQuery, Bootstrap bundles I wish to load in my view, I have added them to my bundlesconfig and added it to my view in @script.render, however my scripts files are clearly not rendering as I cannot even make use of bootstrap…
-1
votes
2 answers

Asp.net MVC 4 bundling generation of .min files

I use bundling for some .css files in my solution. I have noticed that when I run the solution in "release" mode (with debug="false" in web.config) a .min file is created, if not existing, for each file included in the bundles. I have made some…
Sean
  • 923
  • 3
  • 14
  • 36
-1
votes
1 answer

ASP.NET Web Optimization Framework - throws errors

ASP.NET Web Optimization Framework throws errors in CSS minification, I tried, validated and did everything to fix, but seems framework bug /* Minification failed. Returning unminified contents. (1,1-2): run-time error JS1195: Expected expression:…
-1
votes
1 answer

How can I include child directories in a bundle pattern?

In the code for my bundle configuration, assume the following is declared and initialised: BundleCollection bundles; I have js files that I want to include in the following directories: ~/Scripts/app ~/Scripts/app/some-namespace I've been able to…
Sam
  • 40,644
  • 36
  • 176
  • 219
-1
votes
1 answer

MVC4 bundle hash is different depending on server

For our application, the file hash MVC4 bundling generates (i.e. "/bundles/myBundle?v=xxxxxx")for any given bundle is different depending on the server we hit. The servers do run slightly different editions of the same OS however I was under the…
-1
votes
2 answers

Bundling in MVC4

In my MVC application, Initially I called all the scripts and styles in Each page. After seeing the Bundling concept. I referred the scritps and styles in the Bundle.config page. Here the scripts are not referred in my page. I dont use a Layout page…
kk1076
  • 1,740
  • 13
  • 45
  • 76
-2
votes
1 answer

Image paths are getting converted to data URI instead of URL

I have a basic React app set up using the Create-React-App tool. I have an images in my images folder: /src/img/logo.png I am including it in one of my component JS files (let's say it's located at /src/Login.js) like this: import logo from…
Cog
  • 1,545
  • 2
  • 15
  • 27
-5
votes
1 answer

Javascript code automated minification

I want to minify my existing javascript code and I want to achieve something like what we do for css preprocessors. We write in scss file and it gets converted into .css file on its own when the scss file is saved. Similary I want to achieve if I…
Nishant Kumar
  • 81
  • 1
  • 7
1 2 3
83
84