Sha256: 0ff0120957083baa8c979d761b943964355db2c820599ab3b1b47277a81e0f8b

Contents?: true

Size: 412 Bytes

Versions: 8

Compression:

Stored size: 412 Bytes

Contents

require 'sprockets'
require 'sprockets/index'

module Sprockets
  class WebpackIndex < Index
    def find_asset(*args)
      if @environment.webpack_task_config[:dev_server] || @environment.webpack_task_config[:watch]
        # ensure webpack-dev-server is running or watcher has finished building
        WebpackRails::Task.run_webpack(@environment.webpack_task_config)
      end

      super
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
webpack_rails-1.3.1 lib/sprockets/webpack_index.rb
webpack_rails-1.3.0 lib/sprockets/webpack_index.rb
webpack_rails-1.2.2 lib/sprockets/webpack_index.rb
webpack_rails-1.2.1 lib/sprockets/webpack_index.rb
webpack_rails-1.2.0 lib/sprockets/webpack_index.rb
webpack_rails-1.1.1 lib/sprockets/webpack_index.rb
webpack_rails-1.1.0 lib/sprockets/webpack_index.rb
webpack_rails-1.0.1 lib/sprockets/webpack_index.rb