When visiting the url:
~/MyArea/Home/Index
The code will search for bundles in the following locations:
~/
~/MyArea
~/MyArea/Home
~/MyArea/Home/Index
Plus include subfolders of the following conventions into the parent bundle:
_MyBundleSubFolder
_MyBundleSubFolder\WithAnotherSubFolder
Shared
Shared\AnyFolderUnderShared
Which allows you to further separate your files, while having them include at the appropriate level:
~/MyArea/Shared/Scripts/MyArea.js
That example will be included in the ~/MyArea/scripts.js bundle. This also allows you to include scripts that are required for partial views at the relevant level.
As another example scripts or styles that are required by all actions in the controller could be include like so:
~/MyArea/Home/_Scripts
~/MyArea/Home/_Styles
And scripts / styles only required by one action can also be separated by making a folder with the same name:
~/MyArea/Home/Index
~/MyArea/Home/Index