- Set the Build Action of your js and css file to Embedded Resource
- Add this extension method to a static class.
- Make sure the extension method is available in your view
- Use the method in your view
Easy peasy. And slightly hackish and ugly… let me know if you have smoother, cleaner bundling approach 😉
If you’re having problems figuring out the right name of your embedded resource, see my post on how to use embedded resources for how to list them all out.