lib/sewing_kit/railtie.rb in sewing_kit-0.5.8 vs lib/sewing_kit/railtie.rb in sewing_kit-0.6.0

- old
+ new

@@ -5,10 +5,11 @@ require 'sewing_kit/webpack/dev' module SewingKit class Railtie < ::Rails::Railtie initializer "sewing_kit.initialize_webpack" do - if Rails.env.development? && Rails.const_defined?(:Server) + is_development = Rails.env.development? && ENV['SK_SIMULATE_PRODUCTION'] != '1' + if is_development && Rails.const_defined?(:Server) webpack_dev = SewingKit::Webpack::Dev.new webpack_dev.start end end