Skip to content

after migrating from 3.0.2 to 3.2.0 image files are not found by css-loader #1125

@leikind

Description

@leikind

I have files in app/assets/images and SASS styles like .world-icon { background-image: url('world.png'); }. With webpacker 3.0.2 they were found and processed. With 3.2.0 I get the following errors:

    Module not found: Error: Can't resolve './world.png' in '/Users/leikind/projects/fb/backend/app/webpack/stylesheets'
     @ ./node_modules/css-loader?{"minimize":false,"sourceMap":true,"importLoaders":2}!./node_modules/postcss-loader/lib?{"sourceMap":true,"config":{"path":"/Users/leikind/projects/fb/backend/.postcssrc.yml"}}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./app/webpack/stylesheets/application.scss 6:84042-84064 

Adding app/assets/images to resolved_paths in webpacker.yml has no effect.

I have a pretty standard configuration, only one additional loader expose-loader.

What am I missing? How can this be fixed?

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