Skip to content

Commit b10b691

Browse files
committed
Merge pull request #1780 from angular-fullstack/fix/livereload-api-binaries
fix(livereload): ignore api routes and specific non-html files
2 parents 0a93acf + c6a396b commit b10b691

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: app/templates/server/config/express.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@ export default function(app) {
8080
}
8181

8282
if ('development' === env) {
83-
app.use(require('connect-livereload')());
83+
app.use(require('connect-livereload')({
84+
ignore: [
85+
/^\/api\/(.*)/,
86+
/\.js(\?.*)?$/, /\.css(\?.*)?$/, /\.svg(\?.*)?$/, /\.ico(\?.*)?$/, /\.woff(\?.*)?$/,
87+
/\.png(\?.*)?$/, /\.jpg(\?.*)?$/, /\.jpeg(\?.*)?$/, /\.gif(\?.*)?$/, /\.pdf(\?.*)?$/
88+
]
89+
}));
8490
}
8591

8692
if ('development' === env || 'test' === env) {

0 commit comments

Comments
 (0)