mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 00:08:53 +08:00
PERF: Concatenate scripts in development mode
This improves my DOMContentLoaded from 9s+ to less than 4s. Pinging @SamSaffron on this because this was previously controversial. This implementation adds the `@sourceURL` directive so chrome correctly identifies the source files.
This commit is contained in:
@ -127,6 +127,7 @@ module Tilt
|
||||
req_path = "/assets/#{scope.logical_path}.#{extension}"
|
||||
|
||||
@output << "\nwindow.__jshintSrc = window.__jshintSrc || {}; window.__jshintSrc['#{req_path}'] = #{data.to_json};\n"
|
||||
@output << "\n//@ sourceURL=/#{scope.logical_path}\n"
|
||||
end
|
||||
|
||||
@output
|
||||
|
Reference in New Issue
Block a user