I am using the WebEssentials 2013 plugin to minify my js files and I am assuming whenever I build the application in release mode it has to take the minified file rather than the original file. This is not happening with my MVC 4 application. Does anyone have any clue on this issue?
Note: I have already done the below change in BundleConfig.cs
:
#if !DEBUG
BundleTable.EnableOptimizations = true;
#endif
Scripts
Projects
Project.js.bundle
Project.min.js
Project.min.js.map
Project.js.bundle file
<bundle>
<settings>
<minify>true</minify>
<runOnBuild>true</runOnBuild>
<outputDirectory />
</settings>
<files>
<file>/Scripts/Project/CreateProject.js</file>
<file>/Scripts/Project/ViewProject.js</file>
<file>/Scripts/Project/EditProject.js</file>
<file>/Scripts/Project/CloseProject.js</file>
</files>
</bundle>
I have four views like Create Project, View Project, Edit Project, Close Project.
Can I use the bundle for every view or just use a minified file in each view? Which is the best option? I don't know how to include a bundle in my view. Can you provide me with the syntax?