Created
August 11, 2017 09:30
-
-
Save Jonne/801480d1f319b3ff0a7a0fbe3343d227 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Web.Optimization; | |
| using WebActivatorEx; | |
| [assembly: PreApplicationStartMethod(typeof(BundleConfig), "Configure")] | |
| namespace MyProject | |
| { | |
| public class BundleConfig | |
| { | |
| // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 | |
| public static void Configure() | |
| { | |
| var bundles = BundleTable.Bundles; | |
| var reactBundle = new ScriptBundle("~/bundles/react"); | |
| // Added debug directive for including debug versions of React since it has an optimized version which is | |
| // significantly different from the production/minified version (AJvdB) | |
| #if DEBUG | |
| reactBundle.Include("~/Scripts/react.js"); | |
| reactBundle.Include("~/Scripts/react-dom.js"); | |
| #else | |
| reactBundle.Include("~/Scripts/react.min.js"); | |
| reactBundle.Include("~/Scripts/react-dom.min.js"); | |
| #endif | |
| bundles.Add(reactBundle); | |
| bundles.Add(new ScriptBundle("~/bundles/foundation").Include( | |
| "~/assets/vendor/foundation/foundation.min.js")); | |
| bundles.Add(new ScriptBundle("~/bundles/jquery").Include( | |
| "~/Scripts/jquery-1.11.2.js")); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment