Run a Static App
If this is your first Space app take a look at the getting started guide.
Static micros work out of the box with most frontend frameworks like React, Vue, and Svelte. Just set the right engine
value in your Space Spacefile and you are good to go:
v: 0
micros:
- name: frontend
src: src/frontend-app
engine: svelte # or react/vue
The following frameworks are supported configuration-free using engine
:
react
svelte
vue
For other frameworks the configuration is minimal.
Set the engine to static
and specify the directory to serve with serve
. If your framework has a build step, include your build command with the commands
field:
v: 0
micros:
- name: frontend
src: src/frontend-app
engine: static
dev: npm run dev
commands:
- npm run build
serve: dist