One of my .html files imports /socket.io/socket.io.js, I want to vulcanize this file but ignore the script tag that imports socket.io
I wrote the following gulp task:
// vulcanize HTML files
var vulcanizeHtmlSrc = 'views/**/*.html',
vulcanizeHtmlDst = 'build/views';
gulp.task('vulcanize', function() {
gulp.src(vulcanizeHtmlSrc)
.pipe(vulcanize({
excludes: ['//fonts.googleapis.com/*', '/socket.io/socket.io.js'],
stripExcludes: false
}))
.pipe(gulp.dest(vulcanizeHtmlDst));
});
I still get the following error:
ERROR finding /socket.io/socket.io.js
What am I doing wrong?
Just add a class to the
scripttag that requiressocket.io.jsand insertsocket.io.jsusing thegulp-inject-stringmodule after vulcanize. This is a bit hacky. Either way vulcanize still causes a lot of errors and I recommend people eschew Polymer (if the app being developed is up for production) until it is fully stable and has better documentation.