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

NODE_ENV not being set to production during build fixes #845 #873

Merged
merged 2 commits into from
Jan 24, 2018
Merged
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
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