Skip to content

Commit

Permalink
Stop suggesting lazy loading (#140)
Browse files Browse the repository at this point in the history
It causes timing issues and is not desirable for the vast majority of applications.
  • Loading branch information
dhh committed Aug 16, 2024
1 parent 6b54a97 commit 48e28f8
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
// Import and register all your controllers from the importmap under controllers/*

// Import and register all your controllers from the importmap via controllers/**/*_controller
import { application } from "controllers/application"

// Eager load all controllers defined in the import map under controllers/**/*_controller
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
eagerLoadControllersFrom("controllers", application)

// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
// lazyLoadControllersFrom("controllers", application)

0 comments on commit 48e28f8

Please sign in to comment.