Home Is it any value of adding one script file to BundleCollection?
Reply: 0

Is it any value of adding one script file to BundleCollection?

user830
1#
user830 Published in June 22, 2018, 11:31 am

I am designing a very big application now and i want to make good infrastructure for the future.

In Razor (MVC) there is an option to include javascript files in a view by using the function @Scripts.Render("~/Scripts/myscript.js") by specify a specific file or bundle item from BundleCollection which defined in BundleConfig.cs.

I am wondering, is there any added value to define a bundle item in the Scripts.Render function of only single file instead of specify the script file itself?

one of added value i found is that in the long run i will be able to add more files to the bundle as needed without changing the views that using it and i will enjoy the optimization. but i couldn't find added value for that while i am still using one js file in the "bundle".

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.302698 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO