serve icon indicating copy to clipboard operation
serve copied to clipboard

Make --config relative to the current path

Open gunar opened this issue 4 years ago • 1 comments

For this one project, I need to use --config to point to a serve.json that is located in a different directory than the one containing the static files to be served. However, this argument doesn't seem to be working as expected.

$ ls
serve.json
build/

$ serve ./build/ --config serve.json
# doesn't load config

$ serve ./build/ --config ../serve.json
# also doesn't load config

$ serve ./build/ --config $(readlink -f ./serve.json)
# this works (absolute path)

Ideally, I'd want --config to accept paths relative to the working directory. Thanks in advance.

gunar avatar Jul 16 '21 16:07 gunar

serve ./dist --config=../serve.json

This works for me. It resolves from the directory you are serving

spacedawwwg avatar Oct 12 '21 13:10 spacedawwwg