← Graph

Packaging a Rails engine that uses Webpacker

question 2 connections

Audience question: can you package a Rails engine that uses Webpacker, and can the host app also have Webpacker? Adrian: yes, Avo used to do this. You can hook into the host's asset pipeline for dev, and still pre-compile in production/build time to ship compiled assets. It's not easy — you have to add some middleware to hook into Webpacker — but it's doable, and he can share the code.

answer_summary
Yes — Avo did it. Use the same dual approach (hook into host pipeline for dev, pre-compile at build time for shipping), plus custom middleware for Webpacker; not easy, but works.
question Packaging a Rails engine that uses Webpacker
about
Rails Engine concept
Question concerns engines specifically.
question Packaging a Rails engine that uses Webpacker
asked_at
Asked during the Q&A of this talk.

Provenance

Read by
3 extractions