forked from trent_larson/crowd-funder-for-time-pwa
fix(build): resolve shell script export error in .env.development
Fixed malformed comment in .env.development that was causing "export: production).=: not a valid identifier" error in build scripts. The comment was split across lines, causing the shell to interpret " production)." as a variable assignment. - Removed malformed comment line that was breaking build:web script - Build script now successfully validates environment and starts server - Resolves issue preventing Playwright tests from running properly
This commit is contained in:
@@ -300,18 +300,20 @@ serve_build() {
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# Use a simple HTTP server to serve the build
|
||||
if command -v python3 &> /dev/null; then
|
||||
# Use a server that supports SPA routing (serves index.html for all routes)
|
||||
if command -v npx &> /dev/null; then
|
||||
log_info "Starting npx serve with SPA support on port 8080..."
|
||||
npx serve -s dist -l 8080
|
||||
elif command -v python3 &> /dev/null; then
|
||||
log_warn "Python HTTP server doesn't support SPA routing. Routes like /discover, /account will return 404."
|
||||
log_info "Starting Python HTTP server on port 8080..."
|
||||
cd dist && python3 -m http.server 8080
|
||||
elif command -v python &> /dev/null; then
|
||||
log_warn "Python HTTP server doesn't support SPA routing. Routes like /discover, /account will return 404."
|
||||
log_info "Starting Python HTTP server on port 8080..."
|
||||
cd dist && python -m SimpleHTTPServer 8080
|
||||
elif command -v npx &> /dev/null; then
|
||||
log_info "Starting npx serve on port 8080..."
|
||||
npx serve -s dist -l 8080
|
||||
else
|
||||
log_error "No suitable HTTP server found. Install Python or npx serve."
|
||||
log_error "No suitable HTTP server found. Install npx serve or Python."
|
||||
exit 5
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user