lib/tasks/vite.rake in vite_ruby-3.3.2 vs lib/tasks/vite.rake in vite_ruby-3.3.3

- old
+ new

@@ -40,14 +40,14 @@ ViteRuby.commands.verify_install end desc 'Ensure build dependencies like Vite are installed before bundling' task :install_dependencies do + install_env_args = ENV['VITE_RUBY_SKIP_INSTALL_DEV_DEPENDENCIES'] == 'true' ? {} : { 'NODE_ENV' => 'development' } cmd = ViteRuby.commands.legacy_npm_version? ? 'npx ci --yes' : 'npx --yes ci' - result = system({ 'NODE_ENV' => 'development' }, cmd) - + result = system(install_env_args, cmd) # Fallback to `yarn` if `npx` is not available. - system({ 'NODE_ENV' => 'development' }, 'yarn install --frozen-lockfile') if result.nil? + system(install_env_args, 'yarn install --frozen-lockfile') if result.nil? end desc "Provide information on ViteRuby's environment" task :info do ViteRuby.commands.print_info