I’m updating my app to Rails 5.2.3, which move from Webpacker 3 -> 4. I’ve hit an issues where my Stimulus controllers aren’t compiling:
BabelLoaderError: SyntaxError: Unexpected token (14:17)
12 | export default class extends Controller {
13 |
> 14 | static targets = [ "output" ]
| ^
15 |
16 | connect() {
17 | this.outputTarget.textContent = 'Hello, Stimulus!'
From what I’ve found this is fixed with @babel/plugin-proposal-class-properties
, but I have this plugin in my babel.config.js
and am still seeing the issue. Any ideas on what else would be causing this?