Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
NODE_ENV not being set to production during build fixes #845
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates committed Jan 23, 2018
1 parent c204a9f commit 1170432
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions buffalo/cmd/build/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import (
func (b *Builder) buildAssets() error {

if b.WithWebpack && b.Options.WithAssets {
envy.Set("NODE_ENV", "production")
err := b.exec(webpack.BinPath)
if err != nil {
if err := envy.MustSet("NODE_ENV", "production"); err != nil {
return errors.WithStack(err)
}
if err := b.exec(webpack.BinPath); err != nil {
return errors.WithStack(err)
}
}
Expand Down

0 comments on commit 1170432

Please sign in to comment.