0
votes

I downloaded the Polymer Starter Kit and it seems to all works fine. If I run 'gulp serve', I can make changes to index.html and the browsers all reload and display the changes.

However, if I create a simple html file, gulp serve is not forcing a reload when it changes. This is the simple html file:

<html lang="en">
<head>

</head>
<body>
hi
</body>
</html>

Note when I 'view source' on the served page the gulp injection script is not there. It does not seem to be injecting the script it uses to listen for refresh requests from the server.

2

2 Answers

0
votes

I think you need to add your file to the gulpfile.js in the app directory. Look for a function:

// Watch files for changes & reload 
gulp.task('serve', ['styles', 'elements'], function() {
0
votes

'gulp serve' injects script into served pages that listens to the gulp server for updates whereupon it refreshes the page. The polymer starter kit has a 'snippetOptions' block as part of the 'serve' task. This 'snippetOptions' block should be removed, then all pages will be synced and served, not just the ones containing the tag referenced in 'snippetOptions'.