- Run
browser-sync -w
\ - Access the file from
file
query parameter instead of in path
e.g
usehttp://localhost:3000?file=index.css
instead ofhttp://localhost:3000/index.css
Last active
March 27, 2020 18:19
-
-
Save frullah/eff3e969fdfc66dc535098a9d40b0b9f to your computer and use it in GitHub Desktop.
static file browser-sync
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
<body style="height: 100vh; margin: 0;"> | |
<iframe id="iframe" frameborder="0" width="100%" height="100%"></iframe> | |
<script> | |
var file = new URLSearchParams(location.search).get('file') | |
document.getElementById('iframe').src = file | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment