mperdeck / jsnlog.js

Tiny JavaScript logging library, simple and well documented. Lots of options to filter logging data.
js.jsnlog.com
Other
130 stars 43 forks source link

Generate configuration javascript independently from loading jsnlog.min.js script #69

Closed ajbeaven closed 6 years ago

ajbeaven commented 6 years ago

I'd like to bundle jsnlog.min.js up with my other scripts for performance reasons, but it doesn't seem possible to do with how JSNLog is set up.

@Html.Raw(JSNLog.JavascriptLogging.Configure())

This generates javascript for the client that sets a configuration object and generates the <script> tag for loading jsnlog.min.js. Unlike the .Net Core variation, there doesn't seem to be a way to generate just the configuration object - this would be helpful for this case.

ajbeaven commented 6 years ago

Ahh, removing the productionLibraryPath attribute from the jsnlog configuration in web.config has this affect. The <script> tag is no longer added and can be loaded elsewhere.