lib/jets/builders/code_builder.rb
# Bit hacky but this saves the user from accidentally forgetting to change this
# when they deploy a jets project in development mode
Bit hacky but this saves the user from accidentally forgetting to change this
when they deploy a jets project in development mode
Bit hacky but this saves the user from accidentally forgetting to change this when they deploy a jets project in development mode
def reconfigure_development_webpacker
      return unless Jets.env.development?
      headline "Reconfiguring webpacker development settings for AWS Lambda."
      webpacker_yml = "#{full(tmp_code)}/config/webpacker.yml"
      return unless File.exist?(webpacker_yml)
      config = YAML.load_file(webpacker_yml)
      config["development"]["compile"] = false 
      new_yaml = YAML.dump(config)
      IO.write(webpacker_yml, new_yaml)
    end
def reconfigure_development_webpacker return unless Jets . env . development? headline "Reconfiguring webpacker development settings for AWS Lambda." webpacker_yml = "#{full(tmp_code)}/config/webpacker.yml" return unless File . exist? ( webpacker_yml ) config = YAML . load_file ( webpacker_yml ) config [ "development" ] [ "compile" ] = false new_yaml = YAML . dump ( config ) IO . write ( webpacker_yml , new_yaml ) end
Bit hacky but this saves the user from accidentally forgetting to change this
when they deploy a jets project in development mode
Bit hacky but this saves the user from accidentally forgetting to change this when they deploy a jets project in development mode
# force this to be false for deployment