ember.js - Image address in ember templates grunt build -


i used yeoman create web app in emberjs. works ok, after using grunt build command, if view built app in browser (from dist directory), can see images missing because src path wrong.

grunt changing names of images in "image" folder, not updating paths in html. updates path in css files; images in .hbs template files still have old path (with old image name)...

anyone know how fix this?

finally got rid of this:

all needed edit gruntfile.js in project's root; rev task 1 manage image renaming; this:

rev: {         dist: {             files: {                 src: [                     '<%= yeoman.dist %>/scripts/{,*/}*.js',                     '<%= yeoman.dist %>/styles/{,*/}*.css',                     '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp}',                     '<%= yeoman.dist %>/styles/fonts/*'                 ]             }         }     }, 

you have delete row tell him process images folder:

rev: {         dist: {             files: {                 src: [                     '<%= yeoman.dist %>/scripts/{,*/}*.js',                     '<%= yeoman.dist %>/styles/{,*/}*.css',                     '<%= yeoman.dist %>/styles/fonts/*'                 ]             }         }     }, 

and done; images keep original names , no path updated in css, html or hbs files... note rev task responsible file renaming, not compression (for images done imagemin task) , images compressed in case...


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -