Sha256: 09e2f13636727fbea79c61c773f12e940c599919cab7a8b17954e56fab37e71a

Contents?: true

Size: 538 Bytes

Versions: 2

Compression:

Stored size: 538 Bytes

Contents

require "importmap/map"

module Importmap
  class Engine < ::Rails::Engine
    config.importmap = Importmap::Map.new

    config.autoload_once_paths = %W( #{root}/app/helpers )

    initializer "importmap.assets" do
      if Rails.application.config.respond_to?(:assets)
        Rails.application.config.assets.precompile += %w( es-module-shims.js )
      end
    end

    initializer "importmap.helpers" do
      ActiveSupport.on_load(:action_controller_base) do
        helper Importmap::ImportmapTagsHelper
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
importmap-rails-0.2.2 lib/importmap/engine.rb
importmap-rails-0.2.1 lib/importmap/engine.rb