Compressing with Closure Compiler

I’m trying to deploy an app and have js compression turned on via Closure Compiler:

config.assets.js_compressor = Closure::Compiler.new(:language_in => 'ECMASCRIPT6')

However, precompilation fails with:

ERROR - Invalid module path "stimulus" for resolution mode "BROWSER"
import { Controller } from "stimulus";

It looks like Closure isn’t able to figure out the right path to the stimulus module, but I’m not sure what I’m doing wrong. Can anyone help?

1 Like