0
votes

I have a bundling code to bundle all of my js.

bundles.Add(new ScriptBundle("~/assets/scripts").Include(
"~/Scripts/a.js",
"~/Scripts/z.js"));

After I implemented third party plugin, it will generated a js file also. Lets say it's c.js... And this c.js is not being bundled

In my page it's being rendered this way :

  1. script a
  2. script c (the third party js)
  3. script z

Any idea why this happening?
I used the Microsoft ASP.NET Web Optimization v1.1.3

1
what is wrong in here - Rajshekar Reddy
the c.js is in between a.js and z.js which are those 2 file are bundled and the c.js isn't being bundles - gill23
Your code example doesn't show c.js in the Include() list. - scottheckel
@gill23 can you show us how are you loading the c.js file? - Rajshekar Reddy

1 Answers

0
votes

This could be due to name collision between your bundle name and third party plugin js script. Try to rename your bundle. For example:

bundles.Add(new ScriptBundle("~/bundles/assets/scripts").Include(
"~/Scripts/a.js",
"~/Scripts/z.js"));