zont / gulp-usemin

MIT License
338 stars 92 forks source link

Colliding with other Gulp tasks using <!-- build:xxx ---> #172

Open ilyador opened 8 years ago

ilyador commented 8 years ago

I have in the index.html file

<!-- build:env -->
<meta name="environment" content="development">
<meta name="debug" content="true">
<!-- endbuild -->

Which is used by other Gulp tasks, and unless I remove it, I get:

events.js:141
      throw er; // Unhandled 'error' event
      ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:8:11)
    at Object.posix.join (path.js:479:5)
    at module.exports (/Users/ilyo/dev/app/node_modules/gulp-usemin/lib/blocksBuilder.js:129:26)

I dug a little and found out section[4] and section[5] are empty https://github.com/zont/gulp-usemin/blob/master/lib/blocksBuilder.js#L97