Lite-server uses
BrowserSync
And allows for configuration overrides
via a local
bs-config.json
or
bs-config.js
file in your project.
The default behavior of the server serves from the current folder
, opens a browser
, and applies an HTML5 route fallback to ./index.html.
so we need to set the configuration
For example, to change the server port, watched file paths, and base directory for your project, create a bs-config.json
in your project's folder:
{
"port": 8000,
"files": ["./src/**/*.{html,htm,css,js}"],
"server": { "baseDir": "./src" }
}
So for browser not opening you have to set like this
{
"port": 8000,
"files": ["./src/**/*.{html,htm,css,js}"],
"server": { "baseDir": "./src" },
"open":false
}
lite-servers
usesbrowserSync
, it might help you – Misguidance