serve
serve copied to clipboard
Make --config relative to the current path
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.
serve ./dist --config=../serve.json
This works for me. It resolves from the directory you are serving