Save 36% for Black Friday! Learn more

Angel Garcia


310 Experience
3 Lessons Completed
0 Questions Solved


Posted in Using webpacker in Rails Engines?

It would be super cool if Chris could cover this. Nobody in that github issue thread has found an official answer to this, and the official README from the rails/webpacker repository just doesn't work as intended. At least not for me.

This is something I've been struggling with for a long time, and apparently so has a lot of other people. There are unanswered StackOverflow posts, unanswered reddit posts, and of course, that entire issue ticket which has ideas but no solutions. There are a few solutions, but they're hacky, and don't work for everyone

Even if the only good solution right now is hacky, that's probably enough for most peoples' needs until someone creates a good solution. I'd love to contribute, but I don't have enough rails and/or webpacker knowledge yet to do so.

This thread started on GoRails started about a year and half ago, and there still isn't a clear answer anywhere. There wasn't a clear answer in rails 5, and there still isn't an answer in rails 6, even with the now released stable version.

Again, it seems that way. If there is some article on the internet some where that explains how to have a rails 6 engine with webpacker that can either server compiled assets to the parent app, or let the parent app be responsible for compiling its own assets as well as all the engines assets to which it's connected, please point me to it.


logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.