- Notifications
You must be signed in to change notification settings - Fork 342
Closed
Description
(This is more a question around understanding and clarification rather than a proposal for a specific fix).
Going off this guide: is there a reason why a file-loader is not needed in the production webpack config?
When I don't include it and I use a require('.../img.png') in my application code, webpack correctly finds the image, renames it based on the hash, dumps it in the right place, and sets the path correctly. In other words, everything works OK.
Per all the documentation I've read on webpack, there are explicit recommendations to put the following in one's config file:
module: { loaders: [ { ... { test: /\.(png|jpg)$/, loader: 'file-loader'} ], }, If I include the above, webpack generates another file that's either malformed or just some dummy stub.
Metadata
Metadata
Assignees
Labels
No labels