How can I configure live-server with an npm script to serve pages that contain a base url.
Software details
Command line used for launching live-server for non production builds, which work fine because urls do not contain base url:
npm script - "development:live-server": "live-server build --quiet --entry-file=/404.html"
OS: Mac OS
Browser (if browser related):
Node.js version: 16+
live-server version: 1.2.2
I am trying to serve both development and production builds from the "build" folder, which is the root of my site. Development and production builds only differ in that production urls are prepended with a base url segment, meaning {baseURL}/someurl.html where as development urls would be generated as /someurl.html.
I have tried using --base for production builds, as in:
npm script - "release:live-server": "live-server build --base="somebaseurl" --quiet --entry-file=/404.html"
but it doesn't work at all.
Before submitting an issue, please, see https://github.com/tapio/live-server#troubleshooting
Issue description
How can I configure live-server with an npm script to serve pages that contain a base url.
Software details
Command line used for launching
live-server
for non production builds, which work fine because urls do not contain base url: npm script -"development:live-server": "live-server build --quiet --entry-file=/404.html"
OS: Mac OS
Browser (if browser related):
Node.js version: 16+
live-server
version: 1.2.2I am trying to serve both development and production builds from the "build" folder, which is the root of my site. Development and production builds only differ in that production urls are prepended with a base url segment, meaning
{baseURL}/someurl.html
where as development urls would be generated as/someurl.html
.I have tried using
--base
for production builds, as in:npm script - "release:live-server": "live-server build --base="somebaseurl" --quiet --entry-file=/404.html"
but it doesn't work at all.