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

Commit

Permalink
Respect GO_ENV when setting NODE_ENV (#1266)
Browse files Browse the repository at this point in the history
Right now, it's not really possible to set NODE_ENV (that is/might be used in webpack) to anything else than development or production. I believe it should be. That code works for me in my project, so I can use it for my "test" environment as well ;)
  • Loading branch information
jswierad authored and markbates committed Sep 3, 2018
1 parent 5eb2603 commit 0d91dd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buffalo/cmd/build/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
func (b *Builder) buildAssets() error {

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

0 comments on commit 0d91dd0

Please sign in to comment.