Created
October 28, 2015 21:54
-
-
Save andrewagain/0b58726838e4c169c9a9 to your computer and use it in GitHub Desktop.
browsersync rewriterules not used
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
node_modules |
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
<!-- Put this file in 'app/index.html', not 'app-index.html' --> | |
Hello World |
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 bs = require("browser-sync").create(); | |
bs.init({ | |
server: "./app", | |
rewriteRules: [ | |
{ | |
match: /Hello/ig, | |
fn: function(match) { | |
console.log('MATCH!!!!'); | |
return 'Cello'; | |
}, | |
}, | |
{ | |
match: 'Hello', | |
replace: 'Shmello', | |
}, | |
], | |
}); |
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-bug", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"dependencies": { | |
"browser-sync": "^2.9.11" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment