Configuration
How sfpm reads project config and which environment variables it respects.
Config file
SFPM reads project configuration from sfpm.config.{ts,js,mjs} at the
project root (TypeScript preferred). The file is loaded with
jiti, so no build step is required.
import { defineConfig } from "@b64/sfpm-core";
export default defineConfig({
namespace: "myns",
sourceApiVersion: "62.0",
hooks: [
// lifecycle hook plugins
],
artifacts: {
trackHistory: true,
},
ignoreFiles: [
// glob patterns excluded from package builds
],
});If no config file is present, SFPM falls back to sensible defaults driven by
sfdx-project.json.
Environment variables
| Variable | Purpose |
|---|---|
SF_DEV_HUB | Default --target-dev-hub for sfpm build. |
SF_TARGET_ORG | Default --target-org for sfpm deploy / install. |
SFPM_FORCE_BUILD | Equivalent to sfpm build --force. |
SFPM_PROJECT_DIR | Override the project directory (debugging). |