diff --git a/lib/generators/htmx/install_generator.rb b/lib/generators/htmx/install_generator.rb index b9c7dfa..22e48d8 100644 --- a/lib/generators/htmx/install_generator.rb +++ b/lib/generators/htmx/install_generator.rb @@ -6,6 +6,7 @@ class InstallGenerator < ::Rails::Generators::Base WEBPACKER_SETUP = "require('htmx.org')\n" SPROCKETS_SETUP = "//= require htmx\n" IMPORTMAP_SETUP = "import \"htmx.org\"\n" + BUN_SETUP = IMPORTMAP_SETUP desc 'Prep application.js to include HTMX installation for Webpacker, Sprockets or Importmap' @@ -57,7 +58,7 @@ def add_to_manifest(manifest, text) def setup_bun run "bun add htmx.org@#{Htmx::Rails::HTMX_VERSION}" - add_to_manifest(manifest('app/javascript'), IMPORTMAP_SETUP) + add_to_manifest(manifest('app/javascript'), BUN_SETUP) end def setup_importmap