Skip to content

Please remove the new dependency on Sprockets #2037

@flavio-b

Description

@flavio-b

Overview/summary

I'm trying to upgrade to 23.0.0, but noticed the guide mentions we need to install sprockets-rails 🙁. I like to keep up with shopify_app as soon as a new version is released, to avoid accumulating changes, but this requirement is a bit of deal breaker and is preventing us from moving forward...

I worked on upgrading apps from Rails 5, 6, 7 to 8, and went through the high churn phase in the asset management side (Sprockets, Webpacker etc). It was a huge relief to finally cleanup & simplify things with the new Rails bundling gems + Propshaft. The best part was removing the old cruft (manifest.js, directives, paths, weird compilation steps etc) and being able to make sense of the process.

Today, I installed sprockets-rails to satisfy this gem's requirement, and immediately run into issues: Missing assets/config/manifest.js, undefined method << for nil in assets.rb, Sprockets::Rails::Helper::AssetNotPrecompiledError 😓

Please consider removing this dependency from the gem, perhaps by including the compiled assets that it may need, or using sprockets as an isolated dependency that doesn't leak to the app level.

There's a lot confusion about Sprockets' workings and quirkiness out there, outdated docs and StackOverflow answers. New developers starting with Rails 8 have Propshaft by default, and needing to install Sprockets on top will drag them back into that world. I think it's really time to move on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions