Javascript? CSS?

Aug 30, 2012 at 5:30 AM

I'm trying to use MvcCodeRouting for a plugin type setup, but how would I get the javascript files and css files that my embedded views need? Preferably while still using the wonderful Bundling and minification? Someone has to have solved this problem already right? Any help is appreciated.

Thanks

Coordinator
Aug 30, 2012 at 3:29 PM

Currently there's no standard way of distributing js and css for your plugin. The VirtualPathProvider implementation is setup to work with views only, and using it for js and css wouldn't be very efficient, but used together with the optimization library could be a good solution.

There's 2 problems: 1) how to distribute js and css with the plugin, 2) how to refer to them from views (URLs). 

There's definately room for improvement and ideas are welcome.

Aug 30, 2012 at 6:36 PM

Thanks for the reply, I've been looking at using a custom IBundleTransform to get embeded js and css into the bundling, but then you'd have to register the bundles of the plugin, and handle bundle name conflicts somehow . . . hmm anyway Thanks!