Added support for non root (home) deployment of bit-server #4923
Fixes Issue
#4923
How to test
- Clone, checkout https://github.com/pgangwani/bit-server-static-public-path-issue
- Above repo represent setup where bit-server is not deploeyed on root
/of the domain - Make sure we setup bit locally with link name
bit-local
# clone
git clone https://github.com/teambit/bit.git
cd bit
# install
rm -rf node_modules public/bit
bit install # this might take a long time
bit compile
# probably not needed:
# npm run build
# npm run build:types
## OR
# npm run build:windows
# one time registration
npm run dev-link bit-local
# OR
npm run dev-link:windows bd
# you will then be able to run:
bd -v
# output will be "last-tag 0.0.516"
# (unlike bit -v, which outputs "0.0.516"
# etc
> ~/project/example-project$
bd start --rebuild
- Run
npm run reproduce:issue - Goto
/bit-dev/route and test the server with & without pushing components.
Proposed Changes
- Need help on how to remove hardcoded values to be coming from configs
- Test all use case
- Review comments for sure
very nice! need to
- [ ] replace hard coded values with configuration (worst case I'll do it)
- [ ] remove unrelated files (yarn.lock, prettiers)
very nice! need to
- [ ] replace hard coded values with configuration (worst case I'll do it)
- [x] remove unrelated files (yarn.lock, prettiers)
Removed unrelated file.
As discussed over slack, I really need to connect stuff. I could connect only static/ folder till now and was able to make changes in respective to files to make it work in /bit-dev/ route
forwarded publicPath to graphql aspect and react-router aspect. Only left to deduce the basename for preview iframe, I need to think how to do that.
forwarded publicPath to graphql aspect and react-router aspect. Only left to deduce the basename for preview iframe, I need to think how to do that.
Thanks @KutnerUri for interim update. Will checkout latest and test. Can you share the steps how can I test when I have just scope.json ?