-
Notifications
You must be signed in to change notification settings - Fork 139
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
Running npm run watch takes a long time with images #82
Comments
Not sure the image compression should be happening in development mode. Assuming that's the mode you're working with and watching. Make sure your If that's all good then check the plugin settings at bottom of the webpack build file. Make sure the compression is indeed the problem by tweaking the compression settings. Another thing you can do - is tell browserSync I do my own compression for one off images, so I ripped out all the image related build aspects from tonik when I first pulled down the repo. |
Images should not be compressed when running in developmend mode. I need to check this to be sure if we having a bug here. |
The first time i run dev, it does process the images, but just once. Any changes after that, the images dont get processed as expected. |
@chrisschwartze Just tested things out on MacOSX and everything runs properly. Images get compressed only when running |
@msacchetti I'm aware of that problem. It looks likes Webpack watching script do not see when new image file has been created. We should address it in separate issue. |
Hey @jedrzejchalubek I'm on macOS Mojave [10.14] Version: webpack 3.12.0 I just realized I'm on a pretty old NPM version, not sure if that causes any issues. I haven't made any changes to the Edit: Also, Webpack/Browsersync never inject the CSS/JS properly. It always reloads the entire page. Is there any reason for that? For my earlier days, I remember Gulp/Browsersync would just inject the CSS and you could see changes real-time without refreshing the page. |
I am not sure what was going on before, but this issue isnt happening anymore. Every time i run dev, all the images get processed. |
If anyone still searching, I found that images are compressed only when I use image src in this format: But it doesn't compress when I use this format: (even as background-image ) all in the development mood. |
Hey all,
Kinda a Webpack noobie here. I'm quite a long way into my project, and I'm starting to get annoyed by the long build time when I'm running
npm run watch
. Every time I make a change in my SCSS or PHP, it's also running the images through thedev pipeline.Any Webpack veterans here who can recommend me a better practice (e.g. just copying images to
public
in dev instead of compression)? Or point me to a good resource?The text was updated successfully, but these errors were encountered: