(Issue2716) Fix optimized build for /docs
Merge pull request #2716 from mrvisser/issue-2716

`/docs` UI breaks in production build