I ended up using the generator from https://github.com/seaneking/generator-polymer-element.
This is my working gulpfile.js: https://jsfiddle.net/svantetobias/qqwcrwcf/1/
I think the critical part here is:
// Core deps
// Using require() because of rollup babel preset
const gulp = require('gulp');
const gulprun = require('run-sequence');
const browserSync = require('browser-sync');
const bs = browserSync.create()
const OPTIONS = {
browserSync: {
server: {
baseDir: './',
index: 'demo/index.html',
routes: {
'/': './bower_components'
}
},
open: false, // Don't open browser on reload
notify: true // Show notifications in the browser.
}
};
gulp.task('build', () => {
// Build stuff...
});
gulp.task('serve', (callback) => bs.init(OPTIONS.browserSync));
gulp.task('refresh', () => bs.reload());
gulp.task('watch', () => gulp.watch(['src/**/*'], () => gulprun('build', 'refresh')));
gulp.task('default', ['build', 'serve', 'watch']);