grunt-usemin
grunt-usemin copied to clipboard
Warning: Cannot read property 'js' of undefined
I stucked on this warning for a while. It happens if you set flow option with:
useminPrepare: {
html: 'built/index.html',
options: {
root: '../../app/',
dest: 'built',
staging: 'tmp',
flow: {
steps: {'js': ['concat', 'uglifyjs']}
}
}
}
Fix is simple, just insert 'post' property:
useminPrepare: {
html: 'built/index.html',
options: {
root: '../../app/',
dest: 'built',
staging: 'tmp',
flow: {
steps: {'js': ['concat', 'uglifyjs']},
post: []
}
}
}
I think usage of steps parameter alone should be mentioned in readme or fixed.
thanks :+1:
It helps a lot
Had the same issue just now. Would be nice to not have to define a empty post flow.
Thanks, helped me too.
@calmdev @yfr which version of usemin are you using ?