Sha256: bf4c1fbecc473728059113fd8e1152ae6f86233e6bf8cfd85c1bde88fd54afde

Contents?: true

Size: 523 Bytes

Versions: 1

Compression:

Stored size: 523 Bytes

Contents

module SprocketsIIFE
  class Railtie < Rails::Engine
    initializer :sprockets_iife do |app|
      proc = -> (env = nil) {
        (env || app.assets).register_bundle_processor 'application/javascript', ::SprocketsIIFE::Processor
      }
      if app.config.assets.respond_to?(:configure)
        app.config.assets.configure do |env|
          require 'sprockets-iife/processor-v3'
          proc.call(env)
        end
      else
        require 'sprockets-iife/processor-v2'
        proc.call
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sprockets-iife-1.0 lib/sprockets-iife/railtie.rb