Open Thomaash opened 1 year ago
The URL rewriting sometimes eats a backslash following the URL, causing syntax errors.
Add the following to an HTML file served from 127.0.0.1:8887:
<script> console.log("[\"baseUrl\",\"127.0.0.1:8887\"]"); console.log("[\"baseUrl\",\"//127.0.0.1:8887\"]"); console.log("[\"baseUrl\",\"http://127.0.0.1:8887\"]"); </script>
and on localhost:3000 you get:
<script> console.log("[\"baseUrl\",\"//localhost:3000"]"); console.log("[\"baseUrl\",\"//localhost:3000\"]"); console.log("[\"baseUrl\",\"//localhost:3000"]"); </script>
import { create as createBrowserSync } from "browser-sync"; const browserSync = createBrowserSync(); browserSync.init({ host: "127.0.0.1", port: 3000, proxy: "127.0.0.1:8887", });
Issue details
The URL rewriting sometimes eats a backslash following the URL, causing syntax errors.
Steps to reproduce/test case
Add the following to an HTML file served from 127.0.0.1:8887:
and on localhost:3000 you get:
Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync