Skip to content

Commit

Permalink
add env var to skip spa deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
coffee-cup committed Mar 1, 2025
1 parent 9b95c61 commit 7aea405
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/providers/node/spa.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ const (
var caddyfileTemplate string

func (p *NodeProvider) isSPA(ctx *generate.GenerateContext) bool {
if ctx.Env.IsConfigVariableTruthy("NO_SPA") {
ctx.Logger.LogInfo("Skipping SPA deployment because NO_SPA is set")
return false
}

isVite := p.isVite(ctx)
isAstro := p.isAstroSPA(ctx)

Expand Down Expand Up @@ -63,8 +68,7 @@ func (p *NodeProvider) DeploySPA(ctx *generate.GenerateContext, build *generate.
Include: installCaddyStep.GetOutputPaths(),
}),
plan.NewStepInput(build.Name(), plan.InputOptions{
Include: []string{"."},
Exclude: []string{"node_modules"},
Include: []string{outputDir},
}),
plan.NewStepInput(caddy.Name(), plan.InputOptions{
Include: []string{DefaultCaddyfilePath},
Expand Down

0 comments on commit 7aea405

Please sign in to comment.