I have a file (index.html
) in my app/
folder in a project. It contains a <base href="/">
tag as well as some imports from app/bower_components/
. As part of my distribution process, I use Gulp to move the code from app/
to dist/
, and then run vulcanize
on it via polybuild
. index.html
makes it into the dist/
directory, as does bower_components/
, but when vulcanize gets it, it tries to open the first import:
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
Instead of looking in dist/bower_components/…
(or just bower_components/…
, relative to the dist/index.html
file), however, it looks for /.index.html/bower_components/…
. How do I stop it from using this and use the relative URL as written in the original code? Commenting out the <base>
tag solves the issue.
Gulp Task (from Polymer Starter Kit):
gulp.task('vulcanize', function () {
return gulp.src('dist/index.html')
.pipe(polybuild({maximumCrush: true}))
.pipe(gulp.dest('dist/'));
});