Skip to content

Version advice for starting with webpacker #2879

@diesl

Description

@diesl

We have a dockerized Rails 5.2 web app and we are planning to start using webpacker.

However, after having read quite a few tickets around here, I am not sure what is the best way to begin this journey. I see that the new versions of webpack and yarn have quite big (breaking) changes in code and philosophy. Because of that I wonder whether I should start with the brand new versions or stick to the "old" stable versions where I have to upgrade to new versions with possibly lots of work again at some point of time.

Let's make it more concrete:
Would it be clever to start using webpacker with

  • Rails 5.2
  • webpacker 6.x
  • yarn 2.x

Or should I stick to the stable version:

  • Rails 5.2
  • webpacker 5.x
  • yarn 1.x

Some more questions are:

  • Can I even use yarn 2.x with Rails 5.2? In some issues concerning yarn 2.x, I mostly read about Rails 6.x making me unsure. If this is the case, would you recommend to update to Rails 6.x first and then go with the new webpacker?
  • In case you recommend the new solution, do you know some docs explaining the installation with Docker (especially the yarn part)?

Thanks for your advice!

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