hotwired / stimulus-rails

Use Stimulus in your Ruby on Rails app
https://stimulus.hotwired.dev
MIT License
637 stars 91 forks source link

rails stimulus:manifest:update replacing our index.js configs #107

Closed laptopmutia closed 2 years ago

laptopmutia commented 2 years ago

from the read me it told us too add this

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

the problem is whenever we use rails stimulus:manifest:update the settings is removed

laptopmutia commented 2 years ago

I not need to use the rails stimulus:manifest:update

because this code already loading all the controllers

import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
eagerLoadControllersFrom("controllers", application)