discourse/db/migrate/20221018100550_add_source_map_to_javascript_cache.rb
David Taylor be3d6a56ce
DEV: Introduce minification and source maps for Theme JS (#18646)
Theme javascript is now minified using Terser, just like our core/plugin JS bundles. This reduces the amount of data sent over the network.

This commit also introduces sourcemaps for theme JS. Browser developer tools will now be able show each source file separately when browsing, and also in backtraces.

For theme test JS, the sourcemap is inlined for simplicity. Network load is not a concern for tests.
2022-10-18 18:20:10 +01:00

8 lines
175 B
Ruby

# frozen_string_literal: true
class AddSourceMapToJavascriptCache < ActiveRecord::Migration[7.0]
def change
add_column :javascript_caches, :source_map, :text
end
end