lib/webpack_rails/webpack.rake in webpack_rails-0.3.0 vs lib/webpack_rails/webpack.rake in webpack_rails-1.0.0

- old
+ new

@@ -6,14 +6,14 @@ WebpackRails::Task.with_app_node_path do system "WEBPACK_STDOUT_LOGGING=yes #{WebpackRails::Task.node_command} #{WebpackRails::Task.webpack_task_script}" end end - task :before_assets_precompile do - # with production config, sprockets index isn't updated correctly by the - # find_asset monkey patch. instead, we just run it before precompiling assets - WebpackRails::Task.run_webpack + task :build_once => :environment do + WebpackRails::Task.build_once(Rails.application.config.webpack_rails) end end # runs before every 'rake assets:precompile' -Rake::Task['assets:precompile'].enhance(['webpack:before_assets_precompile']) +# with production config, sprockets index isn't updated correctly by the +# find_asset monkey patch. instead, we just run it before precompiling assets +Rake::Task['assets:precompile'].enhance(['webpack:build_once'])