Skip to content

Images KO only on test environment (not development) after Webpack 4 upgrade #2152

@ghost

Description

Hello everyone,

I recently upgraded my Rails app to Webpacker 4, following the docs. After a while (damn' you Babel...) everything seems working on my development environment. But for some reason on test environment, I got an issue with manifest.json not including my images (as it does for development).

I tried this and this but without any success 😞

I tried to figure what could be the differences between both environments, but nothing that could lead to that problem, I guess.

For your information I'm using a dockerized Rails application, with Webpacker on his own container for development mode, and everything on the same container (Webpacker and Rails) on test and production.

[EDIT]
Sorry I was not sure about what informations you would need... Here are what has been asked, with apologies:

  1. Here is a quick view of my file system:
app
|- controllers
|- helpers
|- ...
|- models
|- views
|- webpacker (instead of)
|  |- fonts
|  |- images
|  |- js
|  |  |- packs
|  |- sass
  1. JS files are included quite "traditionally", using packs and javascript_pack_tag helpers in views.
    CSS unique file is imported through the stylesheet_pack_tag helper. Fonts are imported directly in my SASS main file (using @font-face). Images are also used in SASS files, but most of the time using image_pack_tag helpers in views.

3 & 4. Here are some gists, as asked:

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesdependency, yarn or other package management

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions