R
R
Roman Rakzin2017-02-11 01:00:47
JavaScript
Roman Rakzin, 2017-02-11 01:00:47

How to assemble a javascript file from multiple files in Razor ASP.NET?

You need to get one big .js file. To facilitate perception, I want to break it into blocks and then assemble it.
How to dynamically assemble a file from others using Razor ASP.NET? Well, or if grunt, gulp - tell me how to implement this in Visual Studio.
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2017-02-11
@petermzg

The old System.Web.Optimization package allows this.

bundles.Add(new ScriptBundle("~/bundles/js/jquery-pack")
                            .Include("~/Scripts/jquery-1.10.2.min.js",
                                          "~/Scripts/jquery-ui.min.js"));

And you get a single packaged file.
Read more here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question