lib/sewing_kit/webpack/manifest.rb in sewing_kit-0.91.0 vs lib/sewing_kit/webpack/manifest.rb in sewing_kit-0.92.0

- old
+ new

@@ -5,27 +5,19 @@ module SewingKit module Webpack # Webpack manifest loading, caching & entry point retrieval class Manifest class NodeSewingKitManifestMissing < StandardError - def initialize(mode, node_error_message) - env_message = if 'production' == mode - "\nIf this is a container build:\n" \ - " - Verify that sewing_kit compilation succeeded before deployment\n" \ - " - Verify that public/bundles/sewing-kit.manifest.json was uploaded\n" \ - " - Verify that public/bundles/sewing-kit.manifest.json exists in the container\n" \ - else - "\nPossible next steps:\n" \ - " - If the server is still starting up, wait for a 'Compiled with latest changes' message" \ - " then refresh your browser\n" \ - " - Check the development console for compilation errors\n" \ - " - Restart your development server\n" - end - + def initialize(node_error_message) super( - "Could not fetch the sewing-kit manifest 🙀 " \ - "#{env_message}\n" \ + "Could not fetch the sewing-kit manifest 🙀 \n" \ + "Possible next steps:\n" \ + " - If the server is still starting up, wait for a " \ + "'Compiled with latest changes' message then refresh your browser\n" \ + " - Check the development console for compilation errors\n" \ + " - Restart your development server\n" \ + "\n" \ "Original error #{node_error_message}" ) end end @@ -57,10 +49,9 @@ instance.manifest end def instance mode = ENV['NODE_ENV'] || Rails.env.to_s - @instance ||= if (mode == 'development' && ENV['SK_SIMULATE_PRODUCTION'] != '1') || Rails.env.test? Development.new else Production.new end