Sha256: ca97f1d79b0ea9a07f54d015c08f1f2af0381a11f84e7a8bc889548f8c7238b5

Contents?: true

Size: 443 Bytes

Versions: 24

Compression:

Stored size: 443 Bytes

Contents

# frozen_string_literal: true

require 'rails/railtie'

class Terser
  # Railtie for Rails
  class Railtie < ::Rails::Railtie
    initializer :terser, :group => :all do |_|
      if config.respond_to?(:assets) # to make sure the sprockets pipeline is active
        config.assets.configure do |env|
          env.register_compressor 'application/javascript', :terser, Terser::Compressor
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
terser-1.1.7 lib/terser/railtie.rb
terser-1.1.6 lib/terser/railtie.rb
terser-1.1.5 lib/terser/railtie.rb
terser-1.1.4 lib/terser/railtie.rb