You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My app has multiple namespaces: admin and front_end. These are divided in 2 entrypoints that import their own controllers, as well as a set of shared controllers:
import{Application}from"@hotwired/stimulus"constapplication=Application.start()// Configure Stimulus development experienceapplication.debug=falsewindow.Stimulus=applicationexport{application}
Stimulus LSP would complain about the data-action attribute because "modal isn't a valid Stimulus controller. Did you mean app--javascript--shared-controllers--modal?"
Versions
Stimulus LSP v.0.1.1
stimulus-rails 1.3.0
Notes
Let me know if you'd like a new Rails app reproducing this or if the information above is enough to drive the discussion forward.
The text was updated successfully, but these errors were encountered:
davidalejandroaguilar
changed the title
Stimulus LSP not supporting custom JS namespaces
Missing support for custom JS namespaces
Oct 13, 2023
Description
My app has multiple namespaces:
admin
andfront_end
. These are divided in 2 entrypoints that import their own controllers, as well as a set of shared controllers:Entrypoints
app/javascript/admin.js
app/javascript/front_end.js
Admin controllers
app/javascript/admin/controllers/index.js
Front end controllers
app/javascript/front_end/controllers/index.js
Shared index
app/javascript/shared/index.js
Shared application
app/javascript/shared/controllers/application.js
Shared controllers
app/javascript/shared/controllers/index.js
Admin layout
Front end layout
When on a
.html.erb
file, Stimulus LSP is referencing the wrong path, e.g.On views/admin/orders/index.html.erb
Stimulus LSP would complain about the
data-action
attribute because"modal isn't a valid Stimulus controller. Did you mean app--javascript--shared-controllers--modal?"
Versions
Notes
Let me know if you'd like a new Rails app reproducing this or if the information above is enough to drive the discussion forward.
The text was updated successfully, but these errors were encountered: