TLDR; This Vercel China article provides you with a simple solution to get your Vercel powered websites fast, stable, and compliant in China.
What is Vercel?
Vercel (previously called Zeit or now.sh) is a cloud platform that provides static site hosting. It has build-in CI/CD feature which pulls your project’s code from Github and build and deploy it live.
Does Vercel work in China?
No. Although Vercel is not blocked in China, Vercel has no servers in mainland China. As a result, Vercel is unstable and slow for users in China.
Speed test results of websites deployed with Vercel and 21YunBox in China
The color results means: green being faster, and red being extremely slow or even inaccessible. As you can see, the site deployed with Vercel in China performs much slower than 21YunBox.
Make your web app performs 10x faster in China.
Get started now, and our staff will assist your journey in China.
Get Started NowThe project’s source code
Here is the source code we used for above tests. We chose a starter from the Hexo blogging framework.
How to Improve the Access Speed of Vercel in China?
There are many static storage providers in China, such as AWS China S3 or Aliyun OSS, which basically guarantees you to have some speed improvement.
The disadvantages of deploying in these storage providers are obvious: there are some upfront configurations, if you want to utilize continuous integration (CI) and continuous deployment (Git push automatic build and deploy), you will need more configuration.
If you want a hassle free, CI/CD build-in service, Vercel gives you the ability outside of China, however, it doesn’t work in China, and 21YunBox is the alternative of Vercel in China. See below steps and screencast to show how it works in action.
Steps to Improve Your Vercel powered Website in China
- Signup on 21YunBox
- Authorize 21YunBox to access the code repository you want to deploy
- Use the following values during creation
Runtime | Static Site |
---|---|
Build command | yarn && hexo deploy |
Publish directory | ./public |
4. Click “Create”
In seconds, your site is builded and deployed live. You can access your project at app_id.21cloudbox.com
(app_id
is the subodmain you defined during the creation process).