Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Has something replaced bundleconfig.json in ASP.NET Core MVC 2.1?

When I create a new ASP.NET MVC Core targeting 2.1 RC1, it doesn't create the bundleconfig.json file which is used for bundling and minification. This file is created if I target 2.0.

Here is a example, the solution contains a new project targeting 2.0 and another targeting 2.1: enter image description here

Has something replaced the builtin bundling and minification, or is this just a bug in RC1?

like image 458
Josh Avatar asked May 18 '18 20:05

Josh


People also ask

What is Bundleconfig json in .NET core?

The bundleconfig. json file is a standard JSON file and very easy to understand. In this file each bundle is named with the "outputFileName" field and the "inputFiles" to be bundled into that output are simply an array of files. There is only one file in each array here.

How do I run Bundleconfig json?

You can run the bundler on all bundleconfig. json files in the solution by using the keyboard shortcut Shift+Alt+i or by using the button on the top level Build menu.

What is Bundleconfig Cs in ASP NET MVC?

Bundling is a new feature in ASP.NET 4.5 that 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.

How do I bundle a JavaScript file in .NET core?

In Task runner right-click or double click on update all files; after doing this your output file mentioned in bundleconfig,json will be created in a mentioned path as shown below. Output will be a file created like this if not please reload your project once. Add CSS and JS file to your . cshtml page or _layout page.


1 Answers

bundleconfig.json was removed from the 2.1 templates because it relied on a tool not created or supported by Microsoft. See https://github.com/aspnet/templating/issues/326.

This file [bundleconfig.json] is for configuring the various incantations of the BundlerMinifier tool, which isn't actually shipped in the templates, or supported by Microsoft.

The ASP.NET Core team has replaced bundleconfig with "libman". Rightclick the project --> Add --> Client Side Library and add the packages you need

like image 134
natemcmaster Avatar answered Sep 20 '22 16:09

natemcmaster