-
-
Notifications
You must be signed in to change notification settings - Fork 51
using with file-loader, files are not builded if in cache, even if dist folder is empty #82
Comments
You don't need |
I encountered the same problem with this config: {
test: /\.(jpe?g|png|gif)$/,
loaders: [
'cache-loader',
urlLoader,
isProduction && imageLoader,
imageSizeLoader
].filter(Boolean)
}, The comment from @evilebottnawi helped me to realize it should be this: {
test: /\.(jpe?g|png|gif)$/,
loaders: [
urlLoader,
'cache-loader',
isProduction && imageLoader,
imageSizeLoader
].filter(Boolean)
}, @evilebottnawi It might a good idea to mention in the readme that it should not be placed before any loader that has side effects like |
It's needed if you have expensive plugins for optimizing images or other assets. |
https://github.com/Akiq2016/test-cache-loader |
Please migrate on https://webpack.js.org/configuration/other-options/#cache |
Expected Behavior
file-loader
outputs all to assets folder.cache-loader
used withfile-loader
.While using with
file-loader
, if output directory does not content assets folder — get those files from cache and put in assets folder.Actual Behavior
Webpack doesn't output assets folder, that shoul be generated by
file-loader
.Code
How Do We Reproduce?
Add
cache-loader
beforefile-loader
.The text was updated successfully, but these errors were encountered: