From 117043204b10a73fc6ca255dfba5895148fd4277 Mon Sep 17 00:00:00 2001 From: Mark Bates Date: Tue, 23 Jan 2018 14:38:50 -0500 Subject: [PATCH] NODE_ENV not being set to production during build fixes #845 --- buffalo/cmd/build/assets.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/buffalo/cmd/build/assets.go b/buffalo/cmd/build/assets.go index b5d476c3c..9984a88c4 100644 --- a/buffalo/cmd/build/assets.go +++ b/buffalo/cmd/build/assets.go @@ -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) } }