diff --git a/config/environments/production.rb b/config/environments/production.rb index de23b5d..acf9aee 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -3,7 +3,8 @@ Rails.application.configure do # Code is not reloaded between requests. config.cache_classes = true - + config.serve_static_assets = true + config.public_file_server.enabled = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers # and those relying on copy on write to perform better. diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 4b828e8..eed2dc9 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -7,7 +7,8 @@ Rails.application.config.assets.version = '1.0' # Rails.application.config.assets.paths << Emoji.images_path # Add Yarn node_modules folder to the asset load path. Rails.application.config.assets.paths << Rails.root.join('node_modules') - +Rails.application.config.assets.precompile += %w(application.js application.css) +Rails.application.config.public_file_server.enabled = true # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + +