-
-
Save WuglyakBolgoink/3f54f9fe8a880d7c77d42e3c7c1b7dbe to your computer and use it in GitHub Desktop.
Pushstate with browserSync (gulp)
This file contains hidden or 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 hidden or 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