Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/(reference)/config-file.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ Two command groups take an explicit path.

The server does not run TypeScript. When `sf publish` or `sf build` packs a version, the CLI evaluates `spacefast.config.ts`. It writes the result into the version as `sf.jsonc`, in place of any `sf.jsonc` on disk. Your source files do not change.

The CLI also stores your `spacefast.config.ts` in the version, as `.spacefast/config-source.ts`, so each version shows which config produced it. It is never served. Your team can read it with the version's files. `spacefast.config.ts` is also part of your source, so if you make the Space's source available, anyone can read it on the source's main branch. Keep tokens and internal URLs out of the file and read them from Space variables. The first time you publish to a Space whose source is available, `sf publish` warns you once.

Files that the config imports are ordinary files. If they are in the published directory, they are published and served.

Hosted Git builds run the same CLI build, so they evaluate a committed `spacefast.config.ts` too.
Expand Down
Loading