Skip to main content

Hosting Single Page Applications on Pages

· 5 min read

Cloud.gov Pages hosts static sites, but this doesn’t mean that developers are limited to only using “static site generators”: anything that can be compiled down into HTML can be run on Pages. You can use a single-page application framework like Vue.js, Svelte, Angular, React, etc. and host it seamlessly on the Pages platform. This is achieved via the npm run pages command which allows developers to add a custom build script, and we’ll automatically publish everything in the _site folder. For this particular single page application we’ll be leveraging vite as our build tool.

GSA.gov

An official website of the U.S. General Services Administration

Looking for U.S. government information and services?
Visit USA.gov