Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to work without sprockets (#671)
This enables omitting Sprockets. Sprockets' tasks (assets:*) not available if you do not require 'sprockets/railtie' and when you try run some rake task got a message: ```bash ReactOnRails: Set generated_assets_dir to default: app/assets/webpack Running via Spring preloader in process 18586 rake aborted! Don't know how to build task 'assets:precompile' (see --tasks) /Users/arthur/.rvm/gems/ruby-2.3.3/gems/react_on_rails-6.3.4/lib/tasks/assets.rake:35:in `<top (required)>' ... ``` My application config ```ruby # frozen_string_literal: true require_relative 'boot' require 'rails' # Pick the frameworks you want: require 'active_model/railtie' require 'active_job/railtie' require 'active_record/railtie' require 'action_controller/railtie' require 'action_mailer/railtie' require 'action_view/railtie' # require 'sprockets/railtie' Bundler.require(*Rails.groups) module My class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s] config.i18n.default_locale = :ru config.i18n.enforce_available_locales = true config.time_zone = 'Moscow' config.middleware.use I18n::JS::Middleware end end ```
- Loading branch information