Know the hosting model
ESA Pages serves the static output produced by Vite. It does not keep npm run dev or an Express listener running.
Build and verify
- Run
npm cito install the locked dependencies. - Run
npm run buildand confirm thatdist/is created. - Run
npm run previewand test every route. - Push the source and
package-lock.jsonto GitHub; do not commitnode_modules/ordist/.
Connect the repository
In Functions & Pages, create or edit a Pages project, authorize GitHub, select the repository and production branch, then configure:
Install: npm ci
Build: npm run build
Root: /
Static assets: ./dist
Function file: blank
Node.js: 22.xA new push to the configured production branch can trigger a new build and deployment.
Official Alibaba Cloud: Functions & Pages →Plan for limits
Official documentation currently lists a maximum of 2,000 Pages files, 25 MB per file and a 1,024 MB compressed package. Use OSS for large downloads instead of placing them in the Pages build.
Charges may apply. Review the ESA plan, region and current pricing shown in your console before enabling or upgrading services. Do not assume a feature remains permanently free.