Created
January 9, 2016 17:48
-
-
Save kcmr/eba67564af1a72baa19c to your computer and use it in GitHub Desktop.
Pushstate with browserSync (gulp)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
browserSync = require('browser-sync'), | |
historyApiFallback = require('connect-history-api-fallback'); | |
gulp.task('serve', function() { | |
browserSync({ | |
files: ['js/**/*.js', '*.html', 'css/**/*.css'], | |
server: { | |
baseDir: '.', | |
middleware: [ historyApiFallback() ] | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "browsersync-pushstate", | |
"devDependencies": { | |
"browser-sync": "^2.11.0", | |
"connect-history-api-fallback": "^1.1.0", | |
"gulp": "^3.9.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi I tried your solution to fix the pushState issue https://github.com/poillic/browsersync-history/blob/master/gulpfile.js but I doesn't work. Did you made something more ?