Skip to content

Production applications don't work with webpacker #7916

@beagleknight

Description

@beagleknight

Description

After merging #7464 we started using two different pipelines to manage assets: sprockets (the old way) and webpacker (the new way).

This upgrade was very necessary, but it also made impossible upgrading a production application. For example, at the moment you cannot create a review app to test a specific feature.

After some work I succeed, and I have this application working: https://decidim-staging-pr-341.herokuapp.com/

Let me explain a bit which steps I followed to make it work:

  1. First I opened a PR in decidim to add some things that are needed. You can see it in here and there is a more extended explanation there. Briefly, we need to compile webpacker assets when we precompile assets in a production environment.
  2. In the application there was more work involved, but it is related that we are using Heroku for deployment. After adding the webpacker initializer file (see chore: setup webpacker codegram/decidim-staging#341) and upgrading decidim I needed to make sure we weren't including the node_modules in the application result (they call it slug).

In conclusion, production applications are possible after merging #7915 but you may need to take some extra steps depending on your environment.

The webpacker migration is still in development, you can see more progress in here:
#7733

Thanks again to @ferblape to make this possible because I really think we should move forward and create a more modern asset pipeline in this application.

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