lib/sewing_kit/railtie.rb in sewing_kit-0.31.1 vs lib/sewing_kit/railtie.rb in sewing_kit-0.31.2

- old
+ new

@@ -15,11 +15,11 @@ require 'sewing_kit/webpack/dev' module SewingKit class Railtie < ::Rails::Railtie initializer "sewing_kit.cache_production_manifest" do - unless SewingKit::Railtie.development_server? + unless SewingKit::Railtie.development_server? || Rails.env.test? SewingKit::CachedProductionManifest = SewingKit::Webpack::Manifest::Base.load_metadata_from_node end end # rubocop:disable Metrics/BlockLength config.after_initialize do @@ -35,10 +35,11 @@ rake_tasks do load "tasks/sewing_kit.rake" end def self.development_server? - Rails.env.development? && ENV['SK_SIMULATE_PRODUCTION'] != '1' && + Rails.env.development? && + ENV['SK_SIMULATE_PRODUCTION'] != '1' && (Rails.const_defined?(:Server) || ENV['SK_FORCE_DEV_SERVER']) end end end