Sha256: b61f4e42f4d292af0a5f162da845eca1c0f53d6be81e347819e0d43f8455902e

Contents?: true

Size: 520 Bytes

Versions: 7

Compression:

Stored size: 520 Bytes

Contents

# frozen_string_literal: true

require 'vite_ruby'
ViteRuby.install_tasks

namespace :vite_rails do
  desc 'Fixes Rails management of node dev dependencies (build dependencies)'
  task :set_node_env do
    ENV['NODE_ENV'] = 'development'
  end
end

# Set NODE_ENV before installation, so that Rails installs JS build dependencies
# on servers that precompile assets.
['yarn:install', 'webpacker:yarn_install'].each do |name|
  Rake::Task[name].enhance([:'vite_rails:set_node_env']) if Rake::Task.task_defined?(name)
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vite_rails-2.0.7 lib/tasks/vite.rake
vite_rails-2.0.6 lib/tasks/vite.rake
vite_rails-2.0.5 lib/tasks/vite.rake
vite_rails-2.0.3 lib/tasks/vite.rake
vite_rails-2.0.2 lib/tasks/vite.rake
vite_rails-2.0.1 lib/tasks/vite.rake
vite_rails-2.0.0 lib/tasks/vite.rake