How to debug Rails Stimulus with Webpack

195 Views Asked by At

Rails 7, jsbundling-rails, webpack

A page using Stimulus gives a JavaScript error which in Chrome points to a compiles JavaScript. For me it would be more useful to have it point to the original Stimulus JavaScript.

Maybe I need to dig back into stack traces and the like.

For example, I'm now seeing TypeError: undefined is not an object (evaluating 't.controllerConstructor.shouldLoad').

0

There are 0 best solutions below