You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When build the app, the task will add timestamp to the images in the assets > images folde. I understand this is to solve the browser cache issue. But somehow, the name of the images been used in the css hasn't been updated. so those images won't shows on the website.
Example:
I have an image (abc.jpg) in the assets/images folder
I use in the css:
background-image: url(./assets/images/abc.jpg);
After build task,
The image's name changed to "abc.xxxxxxxxxx.jpg" (xxxxxxxxxx is the timestamp)
Until is fixed, you can comment 'filerev' in the grunt task 'build' at the Gruntfile.js, and then the filenames will not be renamed :)
The rename thing. as you may read at https://github.com/yeoman/grunt-filerev, is for browser caching purposes; IMHO you can live without it for a while 👍
When build the app, the task will add timestamp to the images in the assets > images folde. I understand this is to solve the browser cache issue. But somehow, the name of the images been used in the css hasn't been updated. so those images won't shows on the website.
Example:
I have an image (abc.jpg) in the assets/images folder
I use in the css:
background-image: url(./assets/images/abc.jpg);
After build task,
The image's name changed to "abc.xxxxxxxxxx.jpg" (xxxxxxxxxx is the timestamp)
I can comment that task in the Gruntfile.js
filerev: {
dist: {
src: [
'<%= yeoman.dist %>/<%= yeoman.client %>/!(bower_components){,/}.{js,css}',
// This ONE '<%= yeoman.dist %>/<%= yeoman.client %>/assets/images/{,/}.{png,jpg,jpeg,gif,webp,svg}',
'<%= yeoman.dist %>/<%= yeoman.client %>/assets/fonts/*'
]
}
}
But, I would like to know if there is a way to make it works without comment that line out?
The text was updated successfully, but these errors were encountered: