You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
jeffschwartz
changed the title
How can I get live-server to serve pages that contain URL that Github Pages requires.
How can I get live-server to work with URLs that are prepended with a base URL during production builds?
Jun 13, 2023
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.
The text was updated successfully, but these errors were encountered: