Skip to content

Improve "module not found" from CSS files #351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
weaverryan opened this issue Jul 18, 2018 · 0 comments
Closed

Improve "module not found" from CSS files #351

weaverryan opened this issue Jul 18, 2018 · 0 comments

Comments

@weaverryan
Copy link
Member

In Webpack 4:

 ERROR  Failed to compile with 1 errors                                         8:32:32 PM

 error  in ./css/another_bg_image.css

Module build failed: ModuleNotFoundError: Module not found: Error: Can't resolve './../images/symfony_logo.png2' in '/Users/weaverryan/Sites/os/webpack-encore/tmp_project_playing/css'
(stacktrace)

This happens if you refer to a non-existent file (e.g. image) from inside a CSS file. The error has all the info you need, but it's super unclear. We should be able to add a formatter/transformer for friendly-errors to improve it.

@weaverryan weaverryan added this to the Webpack 4 integration milestone Jul 23, 2018
@Lyrkan Lyrkan added the HasPR label Aug 16, 2018
weaverryan added a commit that referenced this issue Sep 9, 2018
… (BackEndTea)

This PR was squashed before being merged into the master branch (closes #371).

Discussion
----------

Add formatter and transformer for module not found error

Fixes #351

I don't work with js much, so any feedback is appreciated.

Commits
-------

f496cbf Fix copy paste errors and use template literals
eb4dee5 Add formatter and transformer for module not found error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants