Page reload doesn’t work after enabled the html5mode. We have to rewrite the url and it could be easily done by using a middleware for the connect server.
gulpfile.js
var connect = require('gulp-connect');
var historyApiFallback = require('connect-history-api-fallback');
gulp.task('connect', function() {
connect.server({
middleware: function(connect, opt) {
return [ historyApiFallback({}) ];
}
});
});
Done =)
