I tried to look for some info related to bundling, tried different scenario with the same result: doesn't work!
Here is the project structure:
..........
Content
css
style.css
fonts
images
.........
Scripts
Plugin1
src
css
style1.css
js
js1.js
Plugin2
src
css
style2.css
js
js2.js
Plugin3
src
css
style1.css
js
js2.js
somejs.js
someotherjs.js
case 1 - works
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/css/style.css"));
case 2 - doesn't work
bundles.Add(new StyleBundle("~/js/style").Include(
"~/Scripts/Plugin1/src/css/style1.css",
"~/Scripts/Plugin2/src/css/style2.css",
"~/Scripts/Plugin3/src/css/style3.css"));
My question is, how can I bundle my css from different folders in one single bundle? I know that if the styles are all in the same folder then will work.
Does this have to do anything with the path itself? Does the name of the bundle ... new StyleBundle("~/js/style")..
must match the actual location of the css files (folder structure)?
When the page loads in the page source there is missing the bundle key for the one that doesn't work while for the other one is present:
<link href="/js/style?v=" rel="stylesheet"/>
<link href="/Content/css?v=z_NN8-Oubjqwg7jFATA50T7SzahDLay9Fi3Lti_eSJ81" rel="stylesheet"/>