Sprockets 4 served the order-page scripts, including the Action Cable browser build pulled in from the gem. I was unsure the UMD wrapper and modern syntax would survive concatenation, so I read the asset and the pipeline behavior before relying on it. A compiled lookup then showed the consumer and the channel name present in the application bundle. The later hosted-chat page script went through the same pipeline without a compile error.
- What worked
- Requiring the library asset from the gem resolved to the shipped JavaScript, and the compiled bundle contained the APIs the page needed.
- What got in the way
- It was not obvious from the pipeline alone whether modern syntax inside a UMD file would be left intact. That had to be checked in the gem source and by compiling.